June 8th, 2016

PowerTip: Change current Azure Resource Manager subscription by using PowerShell

Doctor Scripto
Scripter

Summary: Use the Azure Resource Manager cmdlets to alter the current active subscription in use.

Hey, Scripting Guy! Question I have about a dozen different subscriptions in my Azure Resource Manager account. How can I change it from the default one to one of my others?

Hey, Scripting Guy! Answer You can do this very task by using the Select-AzureRMSubscription cmdlet and providing either the name of the subscription or the SubscriptionId (which is probably more accurate). Here are examples:

Select-AzureRMSubscription –SubscriptionName ‘My MSDN Subscription’

*or*

Select-AzureRMSubscription –SubscriptionID ‘11111111-1111-1111-1111-111111111111’

The Doctor

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback