Search notes:

Azure CLI

Azure CLI allows to manage Azure resources and automate common tasks from the command line.

Installing (Windows)

On Windows, Azure CLI is installed with an MSI that can be downloaded from https://aka.ms/installazurecliwindows.

Command groups

Command group Resource type
az group Resource group
az vm Virtual machines
az storage account Storage accounts
az keyvault Key vault
az webapp Web applications
az sql server Azure SQL
az cosmosdb Cosmos DB

az find

az find … searches for commands that contain a given string:
az find secret

az interactive

az interactive automatically displays help information to make it easier to select subcommands.

Common arguments

Arguments that are available for every command are:
--help
--output selects the output format from json, jsonc (colored JSON), tsv (tab separated values), table (human readable) and yaml, the default being JSON)
--query Applies JMESPath expressions on the result.
--verbose
--debug

Configuration

The CLI allows to configure defaults for values with az config (and az init).
A configurable value has a section name (for example defaults or core) followed by a «normal» name.
Some configurable values include:
core.output The format of the result returned by az commands.
defaults.group Resource group for all commands
defaults.location
defaults.web Web app name in az webapp commands
defaults.vm Name of the virtual machine in az vm commands
defaults.vmss Virtual machine scale set in az vmss commands
defaults.acr Container registry name for az acr commands
In a Linux CLI, the default location where the configured values are stored is ~/.azure/config.

See also

az
Cloud Shell

Index