Skip navigation
three blue windows

Selecting Windows Azure Subscription for Object Viewing

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 "<Subscription>" -CurrentStorageAccount "savillstorage"

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

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish