az vmss list 命令返回空值
我在 Azure 中有两个资源组,每个资源组包含一个 VMSS(虚拟机规模集),并且资源在 Azure 门户中可见。问题是,以下命令返回空输出:
az resource list --subscription MySubscription -g vmss-rg
az vmss list --subscription MySubscription -g vmss-rg
az vmss list
但是,使用没有 VMSS 的不同资源组运行 az resources list
可以正常工作。我还使用不同的 Azure 帐户和订阅对其进行了测试,它也有效。
I have two resource groups in Azure, each contains one VMSS (Virtual Machine Scale Sets) and the resources are visible in Azure Portal. The problem is, the following commands return empty output:
az resource list --subscription MySubscription -g vmss-rg
az vmss list --subscription MySubscription -g vmss-rg
az vmss list
However, running az resource list
with different resource groups which doesn't have VMSS works fine. I also tested it with different Azure account and subscription, it also worked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们已经在本地测试了@VenkateshDodda-MT 并且工作正常。将其作为答案发布,以帮助其他社区成员解决类似问题,以便他们能够找到并解决问题。
为了实现上述要求,我们需要
在我们的本地 .
发布在 powershell 中运行命令以获取我们的订阅或资源组下的
vmss
列表:-输出:-
获取VMSS特定资源组下的列表运行以下 cmd:
输出:-

有关更多信息,请参阅此SO THREAD:Azure PS 命令返回空列表 按照 @Olga Osinskaya 的建议 -微软金融科技
We have tested the same command in our local as suggested by @VenkateshDodda-MT and it works fine. Posting it as an answer to help other community members for the similar issue so that they can find and fix their problem.
To achieve the above requirement we need to
install the az powershell module
in our local .Post that run the command in powershell to get the
vmss
list under our subscription or resource groups:-OUTPUT:-
To get the VMSS list under particular resource group run the below cmd:
OUTPUT:-

For more information please refer this SO THREAD:Azure PS command returns empty list as suggested by @Olga Osinskaya - MSFT