如何在Windows 7 / 64bits上的Powershell中使用TLS 1.2

时间:2019-06-03 09:53:05

标签: powershell tls1.2

我正在尝试解决以下问题:

  

异常设置“ SecurityProtocol”:“无法转换值” tls13,   tls12,tls11,tls”键入“ System.Net.SecurityProtocolType”,原因是   无效的枚举值。指定以下枚举之一   值,然后重试。可能的枚举值为“ Ssl3,   Tls”。“

这是我的系统信息(Windows 7/64位):

enter image description here

Powershell版本为:

PS > $PSVersionTable

Name                           Value
----                           -----
CLRVersion                     2.0.50727.8789
BuildVersion                   6.1.7601.17514
PSVersion                      2.0
WSManStackVersion              2.0
PSCompatibleVersions           {1.0, 2.0}
SerializationVersion           1.1.0.1
PSRemotingProtocolVersion      2.1

我确实遵循了here的指示。这等效于:

# 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

我可以验证自己是否拥有:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v4.0.30319

但是对于我来说,它仍然失败(使用新创建的powershell窗口):

PS > [enum]::GetNames([Net.SecurityProtocolType])
Ssl3
Tls

供参考:

enter image description here

0 个答案:

没有答案