【问题标题】:Powershell Azure : Could not create SSL/TLS secure channelPowershell Azure:无法创建 SSL/TLS 安全通道
【发布时间】:2019-08-12 16:59:34
【问题描述】:

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

【问题讨论】:

  • 什么 os\powershell 版本\azure 模块版本?尝试更新到最新模块?
  • 尝试在你的powershell中运行[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls",然后Login-AzureRmAccount,会成功吗?
  • @JoyWang 很酷,它正在工作。谢谢!!!

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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2021-01-04
    • 2015-08-11
    • 2016-11-18
    • 2021-12-13
    • 2014-12-26
    • 2017-02-10
    • 2017-08-22
    • 2016-08-03
    • 2018-06-17
    相关资源
    最近更新 更多