Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login-AzureRmAccount return subscription but Get-AzureSubscription return empty

I am able to login successfully with the Login-AzureRmAccount. Also I am able to see my subscription in the return value of Login-AzureRmAccount. But after login, if I type Get-AzureSubscription it return empty.

Find the below screenshot

enter image description here

like image 388
kabilan Mohanasundaram Avatar asked Feb 22 '17 11:02

kabilan Mohanasundaram


2 Answers

Expanding on the other answers.

In Azure there is two deployment models. Azure Service Management (ASM) and Azure Resource Manager (ARM).

To interact with anything in ASM, you utilise the Azure Module, For Example:

Add-AzureAccount Logs into ASM

Select-AzureSubscription Selects the Subscription you allocate to work within

Get-AzureSubscriptions Shows you all subscriptions

To interact with anything in ARM, you utilise the AzureRM Modules, For Example:

Add-AzureRmAccount Logs into ARM

Select-AzureRmSubscription Selects the ARM Subscription you allocate to work within

Login-AzureRmAccount Logs into ARM Also

ARM PowerShell Overview

ASM PowerShell Overview

like image 71
Lachie White Avatar answered Oct 13 '22 20:10

Lachie White


Well, you need to use Get-AzureRmSubscription (RM), since you are using the cmdlet for ASM mode, not ARM.

There are 2 deployment modes in Azure, ASM (old) and ARM (new one).

like image 32
4c74356b41 Avatar answered Oct 13 '22 22:10

4c74356b41