azure Azure Powershell Selecting subscription


Example

When you have multiple subscriptions under your Azure account; it's important that you are selecting the one you wish to operate on (and use this as default); to avoid accidents happening to resources on the wrong subscription.

Classic mode

Set-AzureSubscription
Select-AzureSubscription 

Resource manager

Select-AzureRmSubscription

Subscription information

The commands above ask you to specify information (e.g., the Subscription ID) to identify the subscription you want to switch to. To list this information for the subscriptions you have access to, run this command:

Get-AzureSubscription