Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / PowerShell Install-Module Error: Unable to Download from URI

March 15, 2024

PowerShell Install-Module Error: Unable to Download from URI

In earlier Windows versions (Windows 8.1, Windows Server 2012 R2), you may see the Unable to download from URI error when trying to install modules from the PowerShell Gallery using NuGet and Install-Module cmdlet.

For example, when installing the Exchange Online PowerShell module (EXOv3), you may see the following PowershellGet and NuGet provider download errors:

Install-Module -Name ExchangeOnlineManagement -Force -Scope AllUsers

WARNING: Unable to download from URI - powershell install module

WARNING: Unable to download from URI – powershell install module

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.
PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.
CategoryInfo : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider
Unable to find package provider 'NuGet'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable'.
+ CategoryInfo : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackageProvider) [Get-PackageProvider], Exception
+ FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageProvider
+ CategoryInfo : InvalidOperation: (:) [Install-Module], InvalidOperationException
+ FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Module
The same error will appear when installing any PowerShell module via NuGet, whether it is AzureAD, VMware PowerCLI, PSWindowsUpdate, SecretManagement, SQLServer, etc.

In this case, you will see a Schannel error with the EventID 36874 in the Event Viewer -> System log.

A TLS 1.2 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The TLS request has failed.

The issue occurs when PowerShell tries to connect to the NuGet repository using legacy TLS/SSL protocols instead of the current TLS 1.2.

Check the PowerShell version installed on your computer:

host|select version

If your PowerShell version is 5.1.14xx or earlier, update it.

By default, earlier PowerShell versions use SSL 3.0 and TLS 1.0 to establish secure HTTPS connections to repositories.

To display a list of protocols used for connection, run the command below:

[Net.ServicePointManager]::SecurityProtocol]

Ssl3, Tls

powershell check for security protocols enabled

In our example, PowerShell is using legacy SSL 3.0, TLS 1.0, or TLS 1.1. Microsoft repository requires TLS 1.2 or TLS 1.3 from clients.

To connect using the TLS 1.2 protocol, you need to run the following command:

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

enable tls 1.2 in powershell

Then you can install a PowerShell module using Install-Module.

In order not to change the HTTPS connection protocol version manually each time, you can set TLS 1.2 as a default connection protocol in .NET Framework 4.5 (and newer). To do this, you need to make the following changes to the registry with the commands:

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

Restart your PowerShell console. Display the list of available protocols:

[Net.ServicePointManager]::SecurityProtocol

Tls, Tls11, Tls12

Now TLS 1.2 will always be used for PowerShell connection and you can install any module with NuGet.

1 comment
6
Facebook Twitter Google + Pinterest
PowerShellWindows 10Windows Server 2019
previous post
Install Active Directory Users and Computers (ADUC) Snap-in on Windows 10/11
next post
Install and Configure SNMP Service on Windows Server and Windows 10/11

Related Reading

Wi-Fi (Internet) Disconnects After Sleep or Hibernation on...

March 15, 2024

PowerShell: Get Folder Size on Windows

April 2, 2024

How to Download Offline Installer (APPX/MSIX) for Microsoft...

March 12, 2024

How to Find the Source of Account Lockouts...

March 12, 2024

How to Delete Old User Profiles in Windows

March 15, 2024

Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

March 17, 2024

Start Menu or Taskbar Search Not Working in...

April 22, 2025

How to Backup and Restore Websites and IIS...

June 8, 2023

1 comment

Allen Marshall May 15, 2024 - 11:49 am

OS Name Microsoft Windows 11 Pro
Version 10.0.22631 Build 22631
Powershell 7.4.2, Administrator level

Thank you for the guidance.

1) The command [Net.ServicePointManager]::SecurityProtocol] has an extraneous ]
2) For this corrected command,
PS C:\Windows\System32> [Net.ServicePointManager]::SecurityProtocol
SystemDefault
I get back, not a specific protocol. How can I determine what the SystemDefault actually is?
3) What are the potential non-Powershell potential impacts of this registry change?

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Delete Old User Profiles in Windows
  • Configuring Port Forwarding in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top