Powershell install-Module –Name PowerShellGet –Force “NUGET”

1 September 2020 Off By Rached CHADER
When you try to install a program using Powershell and you get this error:

 

Open Powershell and check for supported protocols by using

[Net.ServicePointManager]::SecurityProtocol

Run the following 2 cmdlets to set .NET Framework strong cryptography registry keys:

  • Set strong cryptography on 64 bit .Net Framework (version 4 and above)

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

  • set strong cryptography on 32 bit .Net Framework (version 4 and above)

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

Restart Powershell and check again for supported protocol by using

[Net.ServicePointManager] :: SecurityProtocol

Visits: 4892