I just wanted to post a solution to a problem I just faced. I meant to comment on one of the few other posts regarding this, but that option wasn't available.
When I tried to activate my PowerShell 2018 license on my new computer, I got this error:
The request was aborted: Could not create SSL/TLS secure channel.
I found that I needed to enable support strong cryptography for .NET by setting a few registry values:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions" = dword:00000001
"SchUseStrongCrypto" = dword:00000001
Reference: https://docs.microsoft.com/en-us/mem/co ... t#bkmk_net
You need to restart Windows for the settings to work.
Script to set these values:
- $Containers = "HKLM:\SOFTWARE\Microsoft\.NETFramework\v2.0.50727","HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319"
- $Keys = "SchUseStrongCrypto","SystemDefaultTlsVersions"
- foreach ($Container in $Containers) {
- foreach ($Key in $Keys) {
- $value = $null
- if (Get-ItemProperty -Path $Container -Name $Key -ErrorAction SilentlyContinue) {
- $value = Get-ItemPropertyValue -Path $Container -Name $Key
- if ($value -ne 1) {
- write-host "Correcting value: '$Container\$Key' = 1" -back yellow -fore black
- Set-ItemProperty -Path $Container -Name $Key -Value 1
- } else {
- write-host "OK value: '$Container\$Key' = 1" -back darkgreen -fore white
- }
- } else {
- write-host "New value: '$Container\$Key' (DWORD) = 1" -back yellow -fore black
- $Null = New-ItemProperty -Path $Container -Name $Key -PropertyType DWORD -Value 1
- }
- }
- }
Michael