Anuraj
Anuraj

Reputation: 19598

Unable get resource group using Azure CLI - Get-AzureRmResourceGroup command

When I am trying to run Get-AzureRmResourceGroup powershell command, I am getting an error like this.

Error - Get-AzureRmResourceGroup

I am able to execute Connect-AzAccount command and I am able to login to my subscription.

Upvotes: 0

Views: 412

Answers (1)

Nancy Xiong
Nancy Xiong

Reputation: 28204

You need to use compatibility mode with cmdlet Enable-AzureRmAlias to enable AzureRm prefix aliases for Az modules.

By Default, This cmdlet will enable AzureRM aliases in the Az module for the current PowerShell session. You also could add Scope parameter like this.

Enable-AzureRmAlias [-Module <string>] [-Scope Process | CurrentUser | LocalMachine]

enter image description here

Ref: Azure PowerShell – Cross-platform “Az” module replacing “AzureRM”

Upvotes: 3

Related Questions