Azure CLI 2.0: Command reference - az

Commands

az account Manage subscriptions.
az acr Manage Azure container registries.
az acs Manage Azure Container Services.
az ad Synchronize on-premises directories and manage Azure Active Directory resources.
az appservice Manage your Azure Web apps and App Service plans.
az batch Manage Azure Batch.
az cloud Manage the registered Azure clouds.
az component Manage and update Azure CLI 2.0 (Preview) components.
az configure Configure Azure CLI 2.0 Preview or view your configuration. The command is interactive, so just type az configure and respond to the prompts.
az container Set up automated builds and deployments for multi-container Docker applications.
az disk Manage Azure Managed Disks.
az dla Commands to manage Data Lake Analytics accounts, jobs, and catalogs.
az dls Commands to manage Data Lake Store accounts, and filesystems.
az documentdb Manage your Azure DocumentDB (NoSQL) database accounts.
az feature Manage resource provider features, such as previews.
az feedback Loving or hating the CLI? Let us know!
az find Find Azure CLI commands based on a given query.
az group Manage resource groups and template deployments.
az image Manage custom Virtual Machine Images.
az iot Connect, monitor, and control millions of IoT assets.
az keyvault Safeguard and maintain control of keys, secrets, and certificates.
az lab Commands to manage DevTest Labs.
az lock Manage Azure locks.
az login Log in to access Azure subscriptions.
az logout Log out to remove access to Azure subscriptions.
az monitor Commands to manage Azure Monitor service.
az network Manages Azure Network resources.
az policy Manage resource policies.
az provider Manage resource providers.
az redis Access to a secure, dedicated cache for your Azure applications.
az resource Manage Azure resources.
az role Use role assignments to manage access to your Azure resources.
az shell Start the interactive shell for Microsoft Azure CLI (preview).
az snapshot Manage point-in-time copies of managed disks, native blobs, or other snapshots.
az sql Manage Azure SQL Databases and Data Warehouses.
az storage Durable, highly available, and massively scalable cloud storage.
az tag Manage resource tags.
az taskhelp Provides long-form help content by topic.
az vm Provision Linux or Windows virtual machines in seconds.
az vmss Create highly available, auto-scalable Linux or Windows virtual machines.

az configure

Configure Azure CLI 2.0 Preview or view your configuration. The command is interactive, so just type az configure and respond to the prompts.

az configure [--defaults]

Optional Parameters

--defaults -d
Space separated 'name=value' pairs for common arguments defaults, e.g. '--defaults group=myRG web=myweb vm=myvm'. Use '' to clear the defaults, e.g. --defaults vm='' web=''.

az feedback

Loving or hating the CLI? Let us know!

az feedback

az find

Find Azure CLI commands based on a given query.

az find --search-query
[--reindex]

Examples

Search for things containing 'vm' or 'secret'

az find -q vm secret

Required Parameters

--search-query -q
Query text to find.

Optional Parameters

--reindex
Clear the current index and reindex the command modules.

az login

Log in to access Azure subscriptions.

az login [--allow-no-subscriptions]
[--password]
[--service-principal]
[--tenant]
[--username]

Examples

Log in interactively.

az login

Log in with user name and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled.

az login -u johndoe@contoso.com -p VerySecret

Log in with a service principal using client secret.

az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com

Log in with a service principal using client certificate.

az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant contoso.onmicrosoft.com

Optional Parameters

--allow-no-subscriptions
Support access tenants without subscriptions. It's uncommon but useful to run tenant level commands, such as 'az ad'.
--password -p
Credentials like user password, or for a service principal, provide client secret or a pem file with key and public certificate. Will prompt if not given.
--service-principal
The credential representing a service principal.
--tenant -t
The AAD tenant, must provide when using service principals.
--username -u
Organization id or service principal.

az logout

Log out to remove access to Azure subscriptions.

az logout [--username]

Optional Parameters

--username
Account user, if missing, logout the current active account.

az shell

Start the interactive shell for Microsoft Azure CLI (preview).

az shell [--style {bg, br, contrast, default, grey, halloween, neon, none, pastel, primary, purple, quiet}]

Optional Parameters

--style -s
The colors of the shell.
accepted values: bg, br, contrast, default, grey, halloween, neon, none, pastel, primary, purple, quiet