Azure CLI Commands List

This blog discusses the top Azure CLI commands for creating and managing your Azure resources. Like PowerShell, Azure CLI is also a command-line tool that quickly completes your job.

Azure CLI Commands List

Let us discuss the complete list of commands regarding Virtual Machines, Storage Accounts, Resource Groups, etc.

Managing Virtual Machines

Command NameDescription
az vm createThis command can help you create an Azure Virtual machine (VM).
az vm deleteTo delete an Azure Virtual machine (VM).
az vm startTo start a stopped Azure Virtual machine (VM).
az vm stopTo stop a running Azure Virtual machine (VM).
az vm deallocateTo deallocate your Azure Virtual Machine.
az vm updateTo update different properties of an Azure Virtual Machine (VM).
az vm listLists the details of Azure Virtual Machines (VMs).
az vm restartTo restart Azure Virtual Machines (VMs).
az vm resizeTo resize an Azure Virtual Machines (VM).
az vm showTo get the details of an Azure VM.
az vm deallocateTo deallocate an Azure Virtual Machine (VM).
az vm userTo manage a user account for a Virtual Machine.
az vm user updateTo update a user account for a Virtual Machine.
az vm user deleteTo delete a user account from a Virtual Machine (VM).
az vm captureTo capture the details of a stopped Azure Virtual Machine.
az vm applicationTo manage applications for a Virtual Machine.
az vm auto-shutdownManage auto-shutdown for your Azure VM.
az vm diagnosticsTo configure the Azure VM diagnostics extension.
az vm convertTo convert a VM with unmanaged disks to use the managed disks.
az vm diskTo manage the managed data disks for an Azure Virtual Machine.
az vm disk detachTo detach a managed disks from Azure VM.
az vm disk attachTo attach managed disks to an Azure VM.
az vm hostTo manage a dedicated host for an Azure Virtual Machine.
az vm generalizeTo generalize a Virtual Machine.

Managing Azure Resource Groups

az group listTo list Azure Resource Groups.
az group showTo get an Azure Resource Group.
az group createTo create a new Azure resource group.
az group deleteTo delete an Azure resource group.
az group existsTo check if an Azure resource group exists.
az group lockTo manage the Azure resource group lock.
az group lock createTo create an Azure resource group lock.
az group lock deleteTo delete a lock from an Azure resource Group.
az group updateTo update an Azure resource group.
az group deploymentTo manage the deployments of Azure Resource Manager.

Managing Azure Storage Accounts

az storage account listTo lists the Azure Storage Accounts.
az storage account createTo create an Azure Storage account.
az storage account showTo show the Azure storage account properties.
az storage account deleteTo delete a storage account based on the specified id or name.
az storage account keysTo manage Azure storage account keys.
az storage account keys listTo retrieve the lists of Azure storage account keys under a specified storage account.
Az storage account keys renewTo generate the access and Kerberos keys for a specified Azure storage account.
az storage account check-nameTo check that the Azure storage account name is valid or not.
az storageTo manage the Azure Cloud Storage resources.
az storage account show-connection-stringTo get the Azure Storage account connection string details.
az storage copyTo copy files or directories from or to Azure storage.
az storage account encryption-scopeManaging encryption scope for an Azure storage account.
az storage account or-policyTo manage the Object Replication Policy of Azure Storage account.
az storage account or-policy createTo create the Object Replication Policy of an Azure Storage account.
az storage account or-policy deleteTo delete the Object Replication Policy of a specified Azure Storage account.

Managing Azure Account information

az account listGet the lists of Azure subscriptions for the logged-in user.
az account createTo create an Azure subscription.
az account clearTo clear all subscription from the local cache of your Azure CLI.
az account lockTo manage locks in Azure subscription level.
az account lock createTo create a lock for Azure Subscription.
az account lock deleteTo delete a lock from an Azure subscription.
az account lock listTo list the information on the locks in Azure subscription.
az account lock showTo show the details of an Azure subscription lock.
az account lock updateTo update the lock of an Azure subscription.
az account setTo set the current Azure subscription.
az account showTo get the details of an Azure subscription.
az account tenantTo manage a tenant.
az account tenant listTo get the list of tenants for your account.
az account subscriptionTo manage an Azure subscription.
az account subscription enableTo enable Azure subscription.
az account subscription renameTo rename an Azure subscription.
az account subscription cancelTo cancel an Azure subscription.

Managing SQL Server

az sql server createTo create a server.
az sql server deleteTo delete a server.
az sql server listTo list the servers.
az sql server keyTo manage SQL server keys.
az sql server key listTo get the lists of SQL Server keys.
az sql server key showShows a SQL Server key.

Managing Key Vault, secrets, and certificates.

Az keyvault listTo list the Azure key Vaults and/or HSMs.
Az keyvault list-deletedTo get information about the deleted Vaults or HSMs under a subscription.
az keyvault recoverTo recover a deleted Vault or HSM.
az keyvault keyTo manage the Azure Key vault keys.
az keyvault key createTo create an Azure Key vault key.
az keyvault updateTo update the properties of an Azure key vault.
az keyvault key listTo list Azure Key vault keys.
az keyvault key recoverTo recover a deleted Azure key vault key to its latest version.
az keyvault key restoreTo restore a backed up key to an Azure Vault.
az keyvault certificateTo manage Azure key vault certificate.
az keyvault certificate createTo create an Azure key vault certificate.
az keyvault backupTo manage a full HSM backup.
az keyvault secretTo manage key vault secret.
az keyvault secret showTo get a secret from a specified key vault.
az keyvault secret listLists the secrets for a specified key vault.
az keyvault secret backupTo back up secret of a specified key vault.

For the complete lists of commands, you can refer to the Microsoft Official Site.

Conclusion

Azure CLI provides us with a list of commands to quickly manage our Azure resources. In this article, we discussed a few commands we use in our daily tasks.

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!