Connect to Azure Subscription Using Azure CLI in PowerShell



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.

az account set --subscription 'subscription name or id'

You can also use -s instead of --subscription.

az account set -s 'subscription name or id'

To check if the subscription is set properly, use the below command.

PS C:\> az account show -otable
Updated on: 2021-08-31T09:45:03+05:30

9K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements