gpt4 book ai didi

Azure PowerShell : Get-AzVM does not display the output

转载 作者:行者123 更新时间:2023-12-02 08:25:35 25 4
gpt4 key购买 nike

根据这个Official document example来自 MS Azure 团队的以下命令应显示我当前订阅中的所有VM。但是,当我使用订阅登录并运行以下命令时,它只是将我带回命令行,没有输出,也没有错误。我在此订阅中确实有虚拟机,并且使用相同订阅的相同登录信息可用于我在同一 session 中执行的其他任务。 问题:我可能缺少什么,我们如何解决这个问题?

PS C:\Users\MyUserName> Get-azVM
PS C:\Users\MyUserName>

最佳答案

您是否已登录 Azure连接-AzAccount

您是否有多个订阅?
如果是这样,您可能需要切换订阅。

Set-AzContext -SubscriptionId "xxxx-xxxx-xxxx-xxxx"

关于Azure PowerShell : Get-AzVM does not display the output,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64971465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com