Skip to content

Instantly share code, notes, and snippets.

@MatthewJDavis
Created February 21, 2020 21:49
Show Gist options
  • Select an option

  • Save MatthewJDavis/2b2cddce424f89199f93335384d5f334 to your computer and use it in GitHub Desktop.

Select an option

Save MatthewJDavis/2b2cddce424f89199f93335384d5f334 to your computer and use it in GitHub Desktop.
Set reg keys so PowerShell does not use TLS1.0 anymore to connect.
# https://docs.microsoft.com/en-us/security/solving-tls1-problem#update-windows-powershell-scripts-or-related-registry-settings
# use the “System Default” TLS versions
$command64 = 'reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:64'
Invoke-Expression -Command $command64
$command32 = 'reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:32'
Invoke-Expression -Command $command32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment