You may be using the DbaTools module for SQL Server administration with Powershell. So how do we Upgrade the Powershell DbaTools Module and what is the version of the dbatools module you are using, I will be telling you about them in this article.
First of all, dbatools must be installed. If it is installed, we can learn the version information with the following command.
1 2 3 |
Get-InstalledModule -Name “DbaTools” <img class="aligncenter" src="https://www.mshowto.org/images/articles/2019/06/Resim-1-2.png" /> |
As you can see in the picture, we are using version 0.9.834, so how do we use the new version? (You can see the version histories from the link below)
1 |
https://www.powershellgallery.com/packages/dbatools/1.0.0 |
Opening a powershell as an administrator and running the following command will be enough for you to upgrade.
1 |
Install-Module -Name dbatools -force |
The output of the command is as follows.
After the process is complete, let’s do the version check again.
As you can see in the picture above, we have successfully upgraded the dbatools module. The most important improvement is that the Azure connection is now available with this version.
We can now also manage our Azure databases using Powershell and DbaTools. In addition, 13 new commands have arrived. The list of newly added commands is as follows.
Add-DbaDbRoleMember
Get-DbaDbRole
New-DbaDbRole
New-DbaInstanceRole
Remove-DbaDbRole
Remove-DbaDbRoleMember
Remove-DbaInstanceRole