Condividi tramite


HOW TO SET YOUR AZURE SUBSCRIPTION AS DEFAULT USING POWERSHELL?

After you Import the Publish settings file , to know how to do this, check this post

you first run this command in Windows Azure PowerShell Command:

Select-Azuresubscription

it will prompt for you to enter the name of the subscription, which you can get by running

Get-Azuresubscription

you type in the name of the subscription and then run this command to set your subscription as default.

Set-azuresubscription

it will prompt for you to enter your subscription name again, please enter the same subscription name you entered at the beginning and then you will be able to see the screenshot below which indicates that you have a successful operation.

Image

Comments

  • Anonymous
    April 08, 2015
    Please dont write blogs if you dont feel like it. You just waste people's time. Horrible. no explanation.

  • Anonymous
    September 02, 2015
    The article which you have written on "HOW TO SET YOUR AZURE SUBSCRIPTION AS DEFAULT USING POWERSHELL?" may not be useful for all, but it will be useful to someone and i'm the one among them. Thanks @moussa.

  • Anonymous
    October 17, 2015
    This was immensely helpful! I had been trying to upload a VHD and it kept telling me the storage container was not found. Turns out, an inactive canceled subscription was set as the default, not my pay-as-you-go subscription. I tried many troubleshooting steps for about a day and was unable to get anywhere until I found this blog. I SURE WISH Azure would automatically default the active subscription and not a canceled one.

  • Anonymous
    January 10, 2016
    This is helpful article for me