How to change Azure Subscription in powershell

Follow these steps –

Import-AzurePublishSettingsFile yourpublishsettings.publishsettings and set your azure account

then type,

Get-AzureSubscription (this will give you the list of subscription)

then finally select the subscription name you want to use

Select-AzureSubscription subscription_name

Select-AzureSubscription <subscription-name> will set the current subscription but not make the default one, so this change will be gone when you open powershell again next time.
If you’d like to change the subscription across sessions, use Select-AzureSubscription -Default <subscription name>

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s