tra*_*max 8 powershell azure azure-powershell
我正在尝试针对AD帐户验证Powershell脚本(根据本指南):
$userName = "username@mydomain.com"
$securePassword = ConvertTo-SecureString -String "myPassword1" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($userName, $securePassword)
Add-AzureAccount -Credential $cred
Run Code Online (Sandbox Code Playgroud)
但是我收到错误:
Add-AzureAccount : unknown_user_type: Unknown User Type
At line:2 char:1
+ Add-AzureAccount -Credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount
Run Code Online (Sandbox Code Playgroud)
我输入用户名/密码并不重要,即使是"adsfasdf",用户名和密码都会给我相同的结果.
以前有人修过这个问题吗?
对于任何提出这个问题的人,我提供的分析解决了我的环境中的类似问题。我还在考虑以下回复中原始问题中非常有用的评论。
在 Microsoft 官方发布的文档中阅读有关组织帐户要求的更多信息:Windows Azure 组织帐户常见问题解答
归档时间: |
|
查看次数: |
4999 次 |
最近记录: |