This document says "To change the default subscription used when logging in with Azure PowerShell, use Set-AzDefault." but Set-AzDefault sets the default resource group from within the current context, The doc was inaccurate and has been updated. what is the way to set the default context used when signing in with Connect-AzAccount. 3 min read.. This article explains how to ā€œreactivateā€ all of your accounts stored in your az account by refreshing your sessions. You might need this if you suddenly run into a script that needs to iterate all of your subscriptions without you being there to sign in to each one of them. Example 3: Get the details of the specified subscription. If you want to retrieve the account details based on the subscription name, use the below cmdlet. In this example, ā€œVisual Studio Enterpriseā€ is the subscription name. az account show --subscription 'Visual Studio Enterprise'. After executing the above command, I got the expected That is, When a VMSS instance is created or reimaged, the customScript extension will be provisioned only after all extensions that it depends on have been provisioned. The extension need not depend on the other extensions for pre-requisite configurations. az vmss extension set --vmss-name my-vmss --name customScript --resource-group my-group Introduction . If you are like me and have to work with many Azure subscriptions with Azure CLI, you must have reached the point where you got tired of inner dialogs and commands like the following You can configure the default subscription using az account set -s NAME_OR_ID.--verbose. Increase logging verbosity. Use --debug for full debug logs. az quota list To create and provision an Azure subscription, visit the Azure Portal ( The query is used to filter output and force ordering, grep selects items that have text "RGD" in them, then the cut command selects the fourth field to show the name of the VM in output. Azure CLI. Open Cloudshell. az vm list --output tsv --query ' []. [id, location, resourceGroup, name]' | grep RGD | cut -f4. Output. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version. Examples Example 1: Get all subscriptions C:\PS>Get-AzureSubscription. This command gets all subscriptions in the account. Example 2: Get a subscription by name C:\PS>Get-AzureSubscription -SubscriptionName "MyProdSubscription" K8eFU.

az account set subscription powershell