Skip to content
Command-line tools for Azure.
Python Roff Shell Rich Text Format Batchfile Dockerfile
Branch: dev
Clone or download
sandipsh and qwordy Added enforcement-mode parameter to policy assignment create command. (

* Added enforcement-mode parameter to policy assignment create command.

* Fixed style, linter errors and added one missing recording file.

* Fixed test_policyinsights_scenario test. Added policyInsights recording files missing recording file.

* minor change - check enforcementMode property on create assignment and regenerated recording files.

* minor change - fix whitespace style error.

* minor change - updated help text and HISTORY.rst file to mention azure-mgmt-resource 4.0.0 package.

* delete blank line

* delete useless file

* fix typo
Latest commit 0c04d1d Sep 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update issue templates - Service Team Support Request (#10443) Sep 10, 2019
.vscode Globally handle msrest ValidationError (#9203) Apr 25, 2019
bin Flake8 (#7695) Oct 29, 2018
build_scripts Remove hardcoded en-us locale in docs links. (#10251) Aug 20, 2019
doc doc: modify some typos in authoring command readme (#10387) Sep 2, 2019
scripts Additional fix for sql (#10581) Sep 20, 2019
src Added enforcement-mode parameter to policy assignment create command. ( Sep 20, 2019
tools Fix CI test discovery (#9759) Jun 24, 2019
.coveragerc Update test scripts and mechanisms Jul 5, 2017
.dockerignore Dockerize Linux Builds (#8000) Jan 10, 2019
.flake8 Flake8 (#7695) Oct 29, 2018
.gitattributes Fixes line endings and adds some INFO and TODO comments Feb 9, 2016
.gitignore update .gitignore for user files in .vscode (#10149) Aug 5, 2019
.snapcraft.yaml Remove explicit versioning informaton in help and supplementary mater… Jul 10, 2018
.travis.yml CI Updates (azdev and ADO) (#9857) Jul 6, 2019
CONTRIBUTING.rst Add LICENSES and update README (#537) Jul 21, 2016
Dockerfile Remove hardcoded en-us locale in docs links. (#10251) Aug 20, 2019
Dockerfile.nanoserver Remove hardcoded en-us locale in docs links. (#10251) Aug 20, 2019 Fixing some nits with the Dockerfiles in the root of the repository.. ( Dec 12, 2018
LICENSE refactor LICENSE.txt to make github even more happier (#8826) Mar 20, 2019 Create all component packages Mar 25, 2016 Remove hardcoded en-us locale in docs links. (#10251) Aug 20, 2019
appveyor-dev.yml add steps to generate extension yml (#6002) Apr 4, 2018
appveyor-mooncake.yml Update Approver file content for deleting generated *.yml files befor… Feb 13, 2018
appveyor.yml add steps to generate extension yml (#6002) Apr 4, 2018
az.completion Support local builds for all installers (Docker, MSI, Pip, Debian, RP… Oct 18, 2017
azure-cli.pyproj DeploymentManager - first release (#9036) Apr 17, 2019
azure-cli.sln [KeyVault] KeyVault Round 3 Commands (#1215) Nov 4, 2016
azure-cli2017.pyproj Policy: Support for Policy new API version 2019-01-01(#10340) Aug 28, 2019
azure-cli2017.sln Create VS2017 version of proj file. (#2450) Mar 9, 2017
azure-pipelines.yml Adding buster (#10517) Sep 16, 2019 Remove explicit versioning informaton in help and supplementary mater… Jul 10, 2018
nose.cfg Fix #2513: Update logging effect in automation (#3437) May 24, 2017
pylintrc functionapp] - devops-build command to create azure devops integratio… Feb 8, 2019
requirements.txt Lock to urllib3==1.24.2 May 1, 2019

Microsoft Azure CLI

Python Travis Build Status Slack

A great cloud needs great tools; we're excited to introduce Azure CLI, our next generation multi-platform command line experience for Azure.

Take a test run now from Azure Cloud Shell!


Please refer to the install guide for detailed install instructions.

A list of common install issues and their resolutions are available at install troubleshooting.

Developer Installation (see below)


$ az [ group ] [ subgroup ] [ command ] {parameters}

Get Started

Please refer to the "get started" guide for in-depth instructions.

For usage and help content, pass in the -h parameter, for example:

$ az storage -h
$ az vm create -h


Here are a few features and concepts that can help you get the most out of the Azure CLI.

Azure CLI Highlight Reel

The following examples are showing using the --output table format, you can change your default using the az configure command.

Tab Completion

We support tab-completion for groups, commands, and some parameters

# looking up resource group and name
$ az vm show -g [tab][tab]
AccountingGroup   RGOne  WebPropertiesRG

$ az vm show -g WebPropertiesRG -n [tab][tab]
StoreVM  Bizlogic

$ az vm show -g WebPropertiesRG -n Bizlogic


You can use the --query parameter and the JMESPath query syntax to customize your output.

$ az vm list --query "[?provisioningState=='Succeeded'].{ name: name, os: storageProfile.osDisk.osType }"
Name                    Os
----------------------  -------
storevm                 Linux
bizlogic                Linux
demo32111vm             Windows
dcos-master-39DB807E-0  Linux

Exit Codes

For scripting purposes, we output certain exit codes for differing scenarios.

Exit Code Scenario
0 Command ran successfully.
1 Generic error; server returned bad status code, CLI validation failed, etc.
2 Parser error; check input to command line.
3 Missing ARM resource; used for existence check from show commands.

More Samples and Snippets

For more usage examples, take a look at our GitHub samples repo or

For how to use CLI effectively, check out tips.

Reporting issues and feedback

If you encounter any bugs with the tool please file an issue in the Issues section of our GitHub repo.

To provide feedback from the command line, try the az feedback command.

Developer Installation


We maintain a Docker image preconfigured with the Azure CLI. See our Docker tags for available versions.

$ docker run -v ${HOME}:/root -it --rm<version>

For automated builds triggered by pushes to this repo, see azuresdk/azure-cli-python. For example:

docker run -v ${HOME}:/root -it --rm azuresdk/azure-cli-python:dev

Edge Builds

If you want to get the latest build from the dev branch, you can use our "edge" builds.

You can download the latest builds by following the links below:

Platform Link

You can easily install the latest Homebrew edge build with the following command:

brew install $(curl -Ls -o /dev/null -w %{url_effective}

Developer Setup

If you would like to setup a development environment and contribute to the CLI, see:

Configuring Your Machine

Authoring Command Modules

Contribute Code

This project has adopted the Microsoft Open Source Code of Conduct.

For more information see the Code of Conduct FAQ or contact with any additional questions or comments.

If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.

You can’t perform that action at this time.