This is the latest news from us.

You can edit this description in the Content Category Manager.

This will show the most recent article. You can easily change it to show more if you wish.

Unable to install NuGet provider for PowerShell

Before installing EXO V2 module, we need to install the PowerShellGet module. The problem is that we are unable to install NuGet provider and a couple of errors are showing. Warning unable to download from URI, unable to download the list of available providers. After the errors, it did not install. In this article, you will learn why this is happening and the solution for installing NuGet provider for PowerShell.

Unable to install NuGet provider for PowerShell

Run PowerShell as administrator. Run the command Install-Module PowershellGet -Force. When asked to install NuGet provider, press Y and follow with Enter.

After pressing Y and follow with Enter, the output is giving us the following warnings.

  • WARNING:  Unable to download from URI.
  • WARNING: Unable to download the list of available providers. Check your internet connection.
  • Unable to find package provider ‘NuGet’. It may not be imported yet.
Why are we getting this error and what is the solution for unable to install and download NuGet provider?

 

Find PowerShell version

Find the PowerShell version that is running on the system. We are going to use the Get-Host cmdlet in Windows Server 2016.

PowerShell 5.1 enables SSL 3.0 and TLS 1.0 for secure HTTP connections by default. Let’s confirm that with the next step.

Check Transport Layer Security protocols

Check the supported security protocols on the system.

As we can see, the security protocols defined in the system are SSL 3.0 and TLS 1.0. Both of the security protocols are deprecated.

Transport Layer Security protocols

See a list of the security protocols and when they are published including the current status. At the moment of writing, only TLS 1.2 and TLS 1.3 are approved.

 

Solution for unable to install NuGet provider for PowerShell

Now that we gathered all the information, we are going to enable TLS 1.2 on the system. Run both cmdlets to set .NET Framework strong cryptography registry keys. After that, restart PowerShell and check if the security protocol TLS 1.2 is added. As of last, install the PowerShellGet module.

The first cmdlet is to set strong cryptography on 64 bit .Net Framework (version 4 and above).

The second cmdlet is to set strong cryptography on 32 bit .Net Framework (version 4 and above).

Restart Powershell and check for supported security protocols.

Run the command Install-Module PowershellGet -Force and press Y to install NuGet provider, follow with Enter.

NuGet provider did download successfully. Did it work for you?

Conclusion

In this article, you learned why you are unable to install NuGet provider for PowerShell. The solution to this problem is configuring TLS1.2 or higher on the system. After that, you can install NuGet for PowerShell. Did you enjoy this article? You may also like Cleanup Exchange logs automatically with scheduled task. Don’t forget to follow us and share this article.