Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Created April 14, 2020 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infamousjoeg/fe2900a35d79f00eaec335856ab3a467 to your computer and use it in GitHub Desktop.
Save infamousjoeg/fe2900a35d79f00eaec335856ab3a467 to your computer and use it in GitHub Desktop.
Force PowerShell to permanently use TLS and not SSL by "Enabling Strong Cryptography"
# Open PowerShell as Administrator and check the current enabled protocols
[Net.ServicePointManager]::SecurityProtocol
# When I ran this, my output was:
# sslv2, tls
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment