Select-AzureRmSubscription:请提供有效的租户或有效的订阅. [英] Select-AzureRmSubscription : Please provide a valid tenant or a valid subscription.

查看:215
本文介绍了Select-AzureRmSubscription:请提供有效的租户或有效的订阅.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了Powershell Runbook,并添加了所有必需的详细信息和有效值.我仍然面临Select-AzureRmSubscription命令的错误.我一直都遇到的错误是 

I have created the Powershell Runbook, and added all the required details and valid values. Still I am facing the error for Select-AzureRmSubscription command. The error I am getting all the time is 

Select-AzureRmSubscription:请提供有效的租户或有效的订阅.

Select-AzureRmSubscription : Please provide a valid tenant or a valid subscription.

我正在Powershell Runbook中使用以下连接设置:

$ connectionName = " AzureRunAsConnection"
$connectionName = "AzureRunAsConnection"

推荐答案

Vishal,您如何验证订阅ID是否正确?您还在订阅ID中包括或删除连字符吗?

Hi Vishal, how are you validating the subscription ID is correct? Also are you including or removing the hyphens in the subscription ID? 

如果还没有这样做,我建议您做的一件事是在本地上运行脚本,以查看它是否成功执行,然后再上传到Azure中的自动化帐户.

If you haven't done so already, one thing I recommend you do is run the script locally to see if it executes successfully before uploading to your automation account in Azure. 

我也鼓励您看一下 有关在您的Azure自动化帐户上配置适当的RBAC的文档,因为如果您的订阅ID有效,这可能是权限问题.

I also encourage you to take a look at this doc on configuring appropriate RBAC on your Azure Automation account as this could be a permissions issue assuming your subscription ID is valid.

希望这会有所帮助.

还注意到您将此问题发布在 Stackoverflow

Also noticed you posted this issue on Stackoverflow


这篇关于Select-AzureRmSubscription:请提供有效的租户或有效的订阅.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆