Who's Online
5 visitors online now
0 guests, 5 bots, 0 members
Support my Sponsor
  • An error has occurred, which probably means the feed is down. Try again later.

Posts Tagged ‘Manage’

Manage Multiple subscriptions in Microsoft Azure PowerShell

Hi All,

We will try to understand if we have multiple Azure subscription in Azure PowerShell, how we need to manage these subscription.

Let us try to find problems when we have Multiple Azure subscriptions in PowerShell.
1. When we run any command we get results only from current subscription
2. Its difficult to find in which subscription our command are being executed

  1. We need to run command “get-azuresubscription” get more details regarding our subscription in PowerShell.
    0221

  2. You can see that I have 2 subscription with ID 7045 and 68b3. We can see that 7045 subscription status has Isdefault and Iscurrent value marked as True, where as 68b3 is marked as false

  3. We can get only subscription 7045  when use command “Get-AzureSubscription –Default” and “Get-AzureSubscription –Current”
    0223

  4. Now when we run command get-azurevm we get details related to current/default subscrption(7045) only.
    0222

  5. Now I tried below command and see details of other subscriptions
    Select-AzureSubscription –SubscriptionName <subscriptionname>
    get-azurevm
    0224

  6. Now if you observe when we run “Get-AzureSubscription –Default” or “Get-AzureSubscription –Current” command we will get 7045 has changed its value to false for Iscurrent.
    0225