Search code examples
azureazure-powershell

How to find the current Azure RM Subscription


In Azure Classic / Service Management, Get-AzureSubscription would give a list of subscriptions in the Tenant with an indicator of which was current.

There was also a Get-AzureSubscription -Current flag that would give you just the current subscription.

Is there a way to find the current subscription in AzureRM.Profile?


Solution

  • Get-AzureRmContext gives you info about the selected subscription, default storage account, etc.

    (Get-AzureRmContext).Subscription gives you the current subscription.