If you have more than one subscription and need to specify which to use, type the following to see the subscriptions for your account: az account list Specify a subscription with the subscription parameter. az account set --subscription Once the feature is enabled, you need to set up an Azure Key Vault and a disk encryption set, if you haven't already. Setting up customer-managed keys for your disks requires you to create resources in a particular order, if you're doing it for the first time. First, you'll need to create and set up an Azure Key Vault. Set up your Azure Key Vault # See what subscription you are currently using. az account show # Get a list of available subscriptions. az account list --output table # If the subscription you are seeking is not in the list # close and reopen your terminal window, # or logout and then sign in again. az logout az login # Did your available subscription list Furthermore, new subscriptions can easily be added to the existing management groups. As a result, policy’s are assigned automatically to new subscriptions. Let’s start! Prerequisites. Optional: Install Visual Studio Code with GIT – Guide for Installation. Azure Powershell Modules – Download link Powershell 7 (recommended) – Download link To view a list of all the Azure Subscriptions you have access to, run the following command: az account list. This command will list out the details for all the Azure Subscriptions you have access to within Microsoft Azure regardless if you have access to 1, 2 or many more. You can see the JSON output contains a few different values, like the . To list all subscriptions - az account list --output table To set your subscription - az account set --subscription "My Demos" For more information please refer this MS DOC . The Add-AzureAccount cmdlet makes your Azure account and its subscriptions available in Windows PowerShell. It's like logging into your Azure account in Windows PowerShell. To log out of the account, use the Remove-AzureAccount cmdlet. Add-AzureAccount downloads information about your Azure account and saves it in a subscription data file in your roaming user profile. It also gets an access Knowing the nouns, verbs, and the Azure PowerShell modules available helps you find commands with the Get-Command cmdlet. For example, to find all VM-related commands that use the Get verb: PowerShell. Open Cloudshell. Get-Command -Verb Get -Noun AzVM* -Module Az.Compute. To help you find common commands, this table lists the resource type az login on specific subscription [duplicate] Closed 2 years ago. If you want to connect to a specific subscription with Az.Accounts, you do something like: Connect-AzAccount -SubscriptionId etc I see that there is no possibility of specifying the SubscriptionId with az login. If my account for example manages multiple subscriptions just examine what the az group deployment list returns, if, for some reason, it doesnt return json, you can force it to do that with -o json. by default it returns json – 4c74356b41 Dec 11, 2019 at 6:53

az account set subscription powershell