Selecting Windows Azure Subscription for Object Viewing
Use PowerShell to select the Windows Azure subscription to view.
May 4, 2014
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
You May Also Like