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

时间:2019-03-21 18:41:14

标签: azure powershell ssl tls1.2 azure-powershell

我正在尝试从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

This did not help

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版本是: 窗口10。

1 个答案:

答案 0 :(得分:1)

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