When this error occurs you’ll get an output along the following similar lines; This issue is likely to occur given that while Azure and Office 365 have moved to TLS 1.2 some other older components by default typically do not use TLS 1.2. So, this is one of those cases where PowerShell is using the wrong TLS configuration. NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider PackageManagement\Import-PackageProvider : No match was found for the specified search criteria and provider name ‘NuGet’. Try ‘Get-PackageProvider -ListAvailable’ to see if the provider exists on the system. NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.ImportPackageProvider
Unable to Download from URI, PowerShell Install-Module Error
This issue occurs when PowerShell tries to connect to the NuGet repository using legacy TLS/SSL protocols instead of the current TLS 1.2 or the newer TLS 1.3. So, if you’re faced with the PowerShell Install-Module Error Unable to Download from URI, you can try the suggestion below to resolve the issue on your system. Let’s see the suggestions in detail. Before you try the suggestions below, as indicated on the error output, check your internet connection to make sure your PC is not experiencing internet connectivity issues and fix possible Network and Internet connection problems on your device.
1] Check and update PowerShell version
To easily and quickly resolve the Unable to Download from URI, PowerShell Install-Module Error on your Windows 11/10 system, you can first check and update the PowerShell version installed on your computer. If your PowerShell version is 5.1.14xx or earlier, update PowerShell. By default, earlier PowerShell versions use SSL 3.0 and TLS 1.0 to establish secure HTTPS connections to repositories. Once you have PowerShell updated and you run the Install-Module cmdlet to install a package on your device but the error in view reoccurs, then you can proceed to the next suggestion.
2] Set PowerShell to use TLS 1.2
Now that you have PowerShell updated on your system but still getting the error, you can check and make sure PowerShell is set to use TLS 1.2 or newer. Do the following:
Press Windows key + X to open Power User Menu.Tap A on the keyboard to launch PowerShell (Windows Terminal) in admin/elevated mode.In the PowerShell console, type or copy and paste in the command below and hit Enter to display a list of protocols used for connection:
As already mentioned, Microsoft repository requires TLS 1.2 or TLS 1.3 from Windows 11/10 client machines; so if the output shows PowerShell is using legacy SSL 3.0, TLS 1.0, or TLS 1.1, you can now run the command below to set PowerShell to use TLS1.2 or newer: Once done, you can install a PowerShell module using the Install-Module without issues. However, the above cmdlet is a temporary workaround for that specific PowerShell session. So, to make this setting permanent in order not to manually change the HTTPS connection protocol version each time, you can set TLS 1.2 as a default connection protocol in .NET Framework 4.5 and newer by running the following commands to edit the registry (make sure to back up the registry or create a system restore point): For 64 bit .NET Framework version 4 and above For 32 bit .NET Framework version 4 and above Once done, restart PowerShell and check for supported protocols. Now TLS 1.2 will always be used for PowerShell connection and you can install any module with NuGet. Hope you find this post informative and helpful enough! Related post: Install-Module command was found in the module PowerShellGet but the module could not be loaded
What TLS version is my server using?
Enter the URL you wish to check in the browser. Right-click the page or select the Page drop-down menu, and select Properties. In the new window, look for the Connection section. This will describe the version of TLS or SSL used.
How do I enable TLS 1.1 and TLS 1.2 on Mac?
Press Ctrl+F12 (or Command+F12 on a Mac), or click the Opera menu and go to Settings→Preferences. Click on the Advanced tab, then Security in the left sidebar, then the Security Protocols button. Make sure that only Enable TLS 1.2 is checked.
Is TLS 1.2 Vulnerable?
There’s a vulnerability in TLS 1.2. Although, researchers say it’s “very hard to exploit” and major vendors have already released security patches for it. TLS 1.3 is the latest version of the internet’s most deployed security protocol, which encrypts data to provide a secure communication channel between two endpoints.