I have 3 subscription in my Azure Account, I need to change the default subscription. When i Run the command:
azure account list
I have this output:
I have tried to change the default or current subscription on this way, with no results...
azure config set subscription {{MyIdSubscription}}
Any ideas? Thanks.
You can change the default settings of the Azure portal to meet your own preferences. Most settings are available from the Settings menu in the top right section of global page header.
To change the azure subscription using PowerShell, we can use the Select-AZSubscription command. When you use this command, you can use either the subscription ID, Subscription Name, or the Tenant ID.
You can run : az account list -o table . The output will be a list of resources in table form. The details of your current subscription will be on line with IsDefault = True .
To connect to the specific azure subscription using Az CLI we need to use “Az account set” command but before using this command make sure you are connected with the Azure cloud using “az login” account. You can also use -s instead of --subscription.
For Azure CLI 2.0 (preview) I had to use
az account set --subscription <name or id>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With