【问题标题】:The term 'Get-AzureSubscription' is not recognized as a name of a cmdlet, function, script file, or executable program术语“Get-AzureSubscription”未被识别为 cmdlet、函数、脚本文件或可执行程序的名称
【发布时间】:2022-07-30 22:55:33
【问题描述】:

我使用以下命令安装了 Az Module,但仍然收到以下错误。

Install-Module -Name Az -AllowClobber -Scope AllUsers
Get-AzureSubscription: The term 'Get-AzureSubscription' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

有什么想法吗?

【问题讨论】:

    标签: azure-powershell


    【解决方案1】:

    获取订阅的命令是Get-AzSubscription

    大多数 Azure 命令包括 Az,而不是 Azure

    您可能需要先使用Connect-AzAccount 登录,然后通过浏览器弹出窗口登录。

    Sign in with Azure Powershell - Microsoft

    【讨论】:

      【解决方案2】:

      Get-AzSubscription 不再有效。使用 Get-AzureRmSubscription 检索您的 Azure 订阅详细信息。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-07-09
        • 1970-01-01
        • 2021-11-01
        • 2021-05-23
        • 2020-11-21
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多