Azure CLI – Important commands at one place

Hi All,
Greetings for the day 🙂 LIFE IS BEAUTIFUL 🙂
On every weekend we are starting sharing basic question and answers (may help to prepare interview , certifications, migration, help to understand basic concepts…) related to Microsoft cloud technologies (Azure, Azure AD, SharePoint, Microsoft 365, Teams, Power Platform and so on).
In last five weeks we shared interview questions about :
- Azure =>https://knowledge-junction.in/2021/05/15/azure-basic-questions-and-answers-help-to-prepare-interviews-and-respective-certifications/
- Azure AD => https://knowledge-junction.in/2021/05/02/azure-ad-basic-questions-and-answers-help-to-prepare-interviews-and-respective-certifications/
- SharePoint 2013 =>https://knowledge-junction.in/2021/05/08/sharepoint-2013-basic-questions-and-answers-help-to-prepare-interviews-respective-certifications-and-migration/
- SharePoint On Premises migration => https://knowledge-junction.in/2021/05/22/sharepoint-on-premises-migration-basic-question-answers-points-best-practices-interview-questions-to-know-while-migrating-from-moss-sharepoint-2010-to-2016/
- SharePoint On-premises to On-premises migration – Important PowerShell commands at one place – Part 1 – https://knowledge-junction.in/2021/05/29/sharepoint-on-premises-to-on-premises-migration-important-powershell-commands-at-one-place-part-1/
In this article we will discuss few important AZURE CLI CMDLETS
To update the latest version of Azure CLI for Windows
az upgrade
“az upgrade” command is included in version 2.11.0. By default auto upgrade for Azure CLI is disabled. To keep auto-upgrade for latest version use following command
az config set auto-upgrade.enable=yes
To sign in to Azure
az login
Verifying the Azure CLI version
az --version
Set subscription to current active subscription or default subscription
az account set --subscription
subscription => Name or ID of sbscription
To create new VM
az vm create \
--resource-group CrmTestingResourceGroup \
--name CrmUnitTests \
--image UbuntuLTS
Restarting VM
az vm restart -g MyResourceGroup -n MyVm
Finding particular command – az find. To find the most popular commands related to the word blob
az find blob
Creating new resource group
az group create --name <name> --location <location>
Where:
-location OR -l => Values from: az account list-locations
Examples:
az group create -l westus -n MyResourceGroup
To list all resource groups – this is useful when we need to verify whether resource group is created successfully or not
az group list
Delete resource group
az group delete --name [--no-wait][--subscription][--yes]
Example :
az group delete -n MyResourceGroup
To check if resource group exists
az group exists --name [--subscription]
Example : az group exists -n MyResourceGroup
’ll stop here 🙂 in part 2 will come up with few more important AZURE CLI cmdlets
If you feel some other commands which you know, need to be included in this collection kindly please share or put in comment box. We will definitely include 🙂
Thanks for reading 🙂 If its worth at least reading once, kindly please like and share 🙂 SHARING IS CARING 🙂
Enjoy the beautiful life 🙂 Have a FUN 🙂 HAVE A SAFE LIFE 🙂 TAKE CARE 🙂
1 Response
[…] Azure CLI – Important commands at one place […]
You must log in to post a comment.