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:

PowerShell nuget - UNABLE TO DOWNLOAD FROM URI tls ssl3
  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 🙂


1 Comment

SOLVED: Command Line To Uninstall, Reinstall, Repair .NET Framework – Up & Running Technologies, Tech How To's · October 18, 2022 at 9:00 pm

[…] a PowerShell as an Admin and run each of these commands one by one adjusting the D:SOURCES path to whatever […]

Leave a Reply

Avatar placeholder

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