Selecting Windows Azure Subscription for Object Viewing

Use PowerShell to select the Windows Azure subscription to view.

John Savill

May 4, 2014

1 Min Read
three blue windows

Q: I have multiple Azure subscriptions, but when I use PowerShell to look at my virtual machines, storage accounts, and so on, I only see the objects from one of my subscriptions. Why?

A: If you run the cmdlet Get-AzureSubscription, you'll see all the subscriptions you have access to based on your account. However, if you run other commands, such as Get-StorageAccount or Get-AzureVM, you'll only see objects from one of the subscriptions. The reason for this is that the Windows Azure cmdlets act on only a single subscription at a time. You need to modify the active subscription as follows:

Set-AzureSubscription -SubscriptionName "" -CurrentStorageAccount "savillstorage"

You'll then see objects associated with the specified subscription.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like