加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – Add-AzureAccount:unknown_user_type:天蓝色自动化

发布时间:2020-12-14 00:00:05 所属栏目:Windows 来源:网络整理
导读:当我尝试连接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_
当我尝试连接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).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读