I had some issues installing dbatools over the weekend and wanted to share my experience. If you have not heard of dbatools I encourage you to go check it out and see what it can do.

The easiest method to install dbatools is to open PowerShell as administrator and run the following command:

Install-Module dbatools

Following the install instructions on the dbatools website and other relevant blog posts around the web the install should be as easy as that. In my case it was not.

After I ran the command it prompted me to install a NuGet provider. When installing the NuGet provider I encountered the error:

WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.
WARNING: Unable to download the list of available providers. Check your internet connection.

To resolve this issue I had to set my PowerShell session to use TLS 1.2.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Once I did this I was able to continue installing dbatools and encountered no other errors.