azure - 在azure自动化中选择订阅

标签 azure azure-automation

我正在尝试在 Windows Azure 中启动并运行自动化脚本。 我收到一条错误消息,告诉我必须使用 Select-AzureSubscription。 此操作失败并出现以下错误:

    Error: Select-AzureSubscription : The subscription named 'xxx' cannot be found. Use Set-AzureSubscription to 
initialize the subscription data.
Parameter name: name
At my-script:15 char:15
+ 
    + CategoryInfo          : CloseError: (:) [Select-AzureSubscription], ArgumentException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCommand

所以我使用了 Set-AzureSubscription 但这个也失败了。 我尝试传递订阅名称和订阅 ID。

有人设法正确配置这个吗?

最佳答案

您需要使用 Add-AzureAccount 设置 Azure 身份验证。请参阅https://msdn.microsoft.com/en-us/library/azure/dn865019.aspx了解更多详情。

关于azure - 在azure自动化中选择订阅,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28303420/

相关文章:

Azure 数据工厂仅从 Blob 存储检索新的 Blob 文件

date - Azure Cosmos DB - 删除某个日期范围内的所有文档

powershell - Get-AzureRmAppServicePlan 和 Get-AzureRmWebApp 在 Runbook 中返回异常

azure - azure SQL基于DTU消耗报警的Auto sql

azure - Runbook 模块部署失败,因为它达到了终端预配状态 'Failed'

python - 如何使用 python 获取对 azure 订阅拥有所有者访问权限的用户列表

azure - 使用 Graph API 对 Azure AD B2C 上的用户进行身份验证

powershell - 如何使用powershell部署到Azure?

azure - 无法为 Azure 上的移动服务创建唯一的 URL

azure - 如何在azure自动化帐户中自动导入Az Powershell模块?