windows – Add-AzureAccount:unknown_user_type:天蓝色自动化上的未知用户类型

前端之家收集整理的这篇文章主要介绍了windows – Add-AzureAccount:unknown_user_type:天蓝色自动化上的未知用户类型前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我尝试连接VM时,我在azure自动化上遇到以下错误.
也请点击此链接 https://stackoverflow.com/questions/29899964/azure-powershell-automation-no-default-subscritpion-has-been-designated

1/4/2016 3:33:14 PM,Error: Add-AzureAccount : unknown_user_type: Unknown User Type
At New-AzureVMEndpoint:16 char:16

1/4/2016 3:33:14 PM,Error: Get-AzureVM : No default subscription has been designated. Use Select-AzureSubscription -Default to
set the default subscription.
At New-AzureVMEndpoint:20 char:20
+
done

我的代码

workflow New-AzureVM
{

[String]  $AzureCredentialAssetName = 'AzureCredential'       
[String]  $AzureSubscriptionIdAssetName = 'dxxxxxx-xxxxxxx'

# Returns strings with status messages 
[OutputType([String])] 

# Connect to Azure and select the subscription to work against 
$Cred = Get-AutomationPSCredential -Name $AzureCredentialAssetName 
$SubId = Get-AutomationVariable -Name $AzureSubscriptionIdAssetName 

$AzureAccount = Add-AzureAccount -Credential $Cred

Get-AzureAccount
Get-AzureVM
echo "done"
}

如果我选择-AzureSubscription -Default’PercriptionName’,则会抛出错误,指出语法无效.

此外,我尝试使用azure in-build模板来连接VM,但是在每个脚本上都出现此错误:Add-AzureAccount:unknown_user_type:Unknown User

请参阅 https://social.msdn.microsoft.com/Forums/en-US/a4f5ac38-db33-4082-a3de-b4b8d501b35a/addazureaccount-unknownusertype?forum=azureautomation.

确保凭据资产名称(不是用户名)是一个简单的字符串.还要确保凭据资产用户名是有效的OrgID用户(例如:abc@fdgdf.onmicrosoft.com),而不是Microsoft / Live帐户(joe@gmail.com).

原文链接:https://www.f2er.com/windows/367799.html

猜你在找的Windows相关文章