If you interact with Azure through the command line, you’ll want to ensure that you’re using the latest version of the CLI. The Azure CLI is updated frequently with features that are available within Azure.

To upgrade, there are really several different options depending on your operating system and current version.

Windows via PowerShell (Preferred Method on Windows)

If you run the command az --version and the version is greater than 2.11.0, you can simply update the Azure CLI by executing az upgrade. Below is a sample result by running az --version:

Azure CLI Version Echoed

If you have a version older than 2.11.0 as indicated above, you can install using PowerShell as an Administrator:

1
$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi

Windows via MSI

You can always install the latest edition using an MSI package. For the latest version, install from here.

Azure CLI Installation from MSI

macOS

On macOS, the latest version of the Azure CLI should be installed using Homebrew. If you do not have Homebrew installed, you can follow the steps here. The Azure CLI requires the Homebrew python3 package and will install it. When you are ready to install the latest Azure CLI, run the following Bash command:

brew update && brew install azure-cli

Linux

Depending on your flavor of Linux, there are different methods of installing the Azure CLI. Microsoft strongly recommends installing the CLI with a package manager. The CLI requires Python 3.6.x or greater, libffi, and OpenSSL 1.0.2. To install on any of the platforms, run the following curl command:

curl -L https://aka.ms/InstallAzureCli | bash

For a complete list of Linux installation options and for installing the Azure CLI in other ways, visit jasong.us/3FL1XcR.