skip to Main Content

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.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 68 Comments

  1. Wonderful!!! I stop to the same error message for hours. Many thanks for your explanation and scripts to help me to install NuGet porvider before PowerShellGet installation.

    Then I can perform “Install-Module -Name ExchangeOnlineManagement” to Install the EXchange Online PowerShell V2 module successfully.

    Many thanks for your efforts!!

  2. Great post… been having issues getting WIM Witch fully operational.. worked like a charm..thanks for the work and post!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top