【发布时间】:2017-08-09 20:57:56
【问题描述】:
我使用我的个人电子邮件 ID(Gmail ID)创建了一个“免费试用”帐户。我收到了错误:
Add-AzureRmAccount : 序列不包含任何元素 At line:1 char:1 + 添加-AzureRmAccount -Credential $cred + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
我运行的代码是
$username = "abc@gmail.com"
$password = "something"
$secpass = $password | ConvertTo-SecureString -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secpass
Add-AzureRmAccount -Credential $cred
是否有某些类型的帐户/订阅可以像这样登录?
【问题讨论】:
标签: powershell azure azure-web-app-service azure-powershell