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用户(例如:[email protected]),而不是Microsoft / Live帐户([email protected]).

相关文章

Windows2012R2备用域控搭建 前置操作 域控主域控的主dns:自...
主域控角色迁移和夺取(转载) 转载自:http://yupeizhi.blo...
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时...
Windows注册表操作基础代码 Windows下对注册表进行操作使用的...
黑客常用WinAPI函数整理之前的博客写了很多关于Windows编程的...
一个简单的Windows Socket可复用框架说起网络编程,无非是建...