【发布时间】: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
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