SOLVED: Nuget in PowerShell – UNABLE TO DOWNLOAD FROM URI: HTTPS://GO.MICROSOFT.COM/FWLINK…

If you are trying to download a module from the PowerShell gallery and seeing a message like

UNABLE TO DOWNLOAD FROM URI: HTTPS://GO.MICROSOFT.COM/FWLINK…

You are likely working on an older operating system with old cryptography. Fortunately, this is very easy to fix:

  1. Launch a new PowerShell as an Administrator
  2. Check the cryrptography your OS supports using this command: [Net.ServicePointManager]::SecurityProtocol
    It probably shows SSL3, TLS like you can see in the screenshot above both of which are deprecated. You need TLS 1.2
  3. To add TLS 1.2 run these two 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
    .
  4. Open a new PowerShell as an Administrator
  5. Check the cryrptography again using this command: [Net.ServicePointManager]::SecurityProtocol
    and you should see:
    TLS, TLS11, TLS12
  6. Install NuGet using this command:
    Install-Module PowershellGet -Force -SkipPublisherCheck
  7. Have a nice cold beer and calm down 🙂

View Comments

Published by
Ian Matthews

This website uses cookies.