Azure – chosing correct subscription

When working with Windows Azure it is possible to have multiple subscriptions available. You might have a private subscription, as well as one or more company subscriptions that you can use. If multiple subscriptions are available, you need to select the correct one before creating Azure infrastructure from PowerShell.

Use the following PowerShell command to make sure you are logged in Windows:


You will be presented with the opportunity to select from available Azure accounts, or supply your windows account ID. When you have successfully logged into Windows Azure, you can use the following commands to find out default subscription, list all available subscriptions and select a desired subscription where you want to create Azure infrastructure.

# Azure account details automatically set
Get-AzureSubscription -Current `
    | select SubscriptionName, ActiveDirectoryUserId

#select all subscriptions
Get-AzureSubscription `
    | Select SubscriptionName, ActiveDirectoryUserId, IsDefault

#select desired subscription
Select-AzureSubscription "[SubscriptionName]"

These commands are important because the current subscription decides the price you have to pay for the things you are creating in Azure.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s