- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to connect to the 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
- Related Articles
- How to list the Azure VMs using Azure CLI in PowerShell?
- How to deallocate the Azure VM using Azure CLI in PowerShell?
- How to start the Azure VM using Azure CLI in PowerShell?
- How to stop the Azure VM using Azure CLI in PowerShell?
- How to restart the Azure VM using Azure CLI in PowerShell?
- How to resize the Azure VM using Azure CLI in PowerShell?
- How to get the Azure resource group using Azure CLI in PowerShell?
- How to get the Azure VM Size using Azure CLI in PowerShell?
- How to get the Azure VM username using Azure CLI in PowerShell?
- How to delete the azure blob (File) using Azure CLI in PowerShell?
- How to list the azure VM extensions using Azure CLI in PowerShell?
- How to change Azure Subscription in PowerShell?
- How to retrieve the Azure VM nic name using Azure CLI in PowerShell?
- How to get the available azure VM size using Azure CLI in PowerShell?
- How to open port for the Azure VM using Azure CLI in PowerShell?

Advertisements