Powershell Azure:无法创建 SSL/TLS 安全通道

Powershell Azure : Could not create SSL/TLS secure channel

我正在尝试从 Powershell 连接到 Azure 并收到以下错误。

PS C:\WINDOWS\system32> Login-AzureRmAccount
Login-AzureRmAccount : Service returned error. Check InnerException for more details: The request was aborted: Could
not create SSL/TLS secure channel.
At line:1 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Connect-AzureRmAccount], AadAuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand



Add-AzureAccount : Service returned error. Check InnerException for more details: The request was aborted: Could not
create SSL/TLS secure channel.
At line:1 char:1
+ Add-AzureAccount
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount

Powershell 版本:

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.590
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.590
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

和 windows 版本是: Window10.

您可以在您的 powershell 中 运行 [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls",然后 Login-AzureRmAccount