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 (4)

  1. Heran Zhao says:

    This is helpful article for me

  2. James says:

    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.

  3. Praveen Kumar Gogula says:

    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.

  4. Atef Yamin says:

    Please dont write blogs if you dont feel like it. You just waste people's time.

    Horrible. no explanation.

Skip to main content