SQL Server PowerShell module installation failed with “Unable to download..” error

Today when installing SQLServer module on one system I got the below error. This happens because the TLS setting for PowerShell is not compatible with PSGallery. Use the below script to set the session TLS version to 1.2 for the session Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Once doing this you will be able to install any module […]

Setting up environment for PowerShell scripts

Being a dba I need to (and wish to) automate everything possible when it’s about SQL Server. And for doing that I use PowerShell alot. Working for different clients I need to setup the environment for the PS scripts to work, which involves installing different modules and changing the execution policy. Below are the things […]