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
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
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).
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