无法使用 Azure CLI 获取资源组 - Get-AzureRmResourceGroup 命令
Unable get resource group using Azure CLI - Get-AzureRmResourceGroup command
当我尝试 运行 Get-AzureRmResourceGroup
powershell 命令时,出现这样的错误。
我可以执行 Connect-AzAccount
命令并且可以登录我的订阅。
您需要使用 cmdlet Enable-AzureRmAlias 的兼容模式来为 Az 模块启用 AzureRm 前缀别名。
默认情况下,此 cmdlet 将为当前 PowerShell 会话在 Az 模块中启用 AzureRM 别名。您还可以添加 Scope
参数,例如 this.
Enable-AzureRmAlias [-Module <string>] [-Scope Process | CurrentUser | LocalMachine]
参考:Azure PowerShell – Cross-platform “Az” module replacing “AzureRM”
当我尝试 运行 Get-AzureRmResourceGroup
powershell 命令时,出现这样的错误。
我可以执行 Connect-AzAccount
命令并且可以登录我的订阅。
您需要使用 cmdlet Enable-AzureRmAlias 的兼容模式来为 Az 模块启用 AzureRm 前缀别名。
默认情况下,此 cmdlet 将为当前 PowerShell 会话在 Az 模块中启用 AzureRM 别名。您还可以添加 Scope
参数,例如 this.
Enable-AzureRmAlias [-Module <string>] [-Scope Process | CurrentUser | LocalMachine]
参考:Azure PowerShell – Cross-platform “Az” module replacing “AzureRM”