Install Azure CLI on Windows
For Windows the Azure CLI is installed via an MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell. When installing for Windows Subsystem for Linux (WSL), packages are available for your Linux distribution. See the main install page for the list of supported package managers or how to install manually under WSL.
The current version of the Azure CLI is 2.0.77. For information about the latest release, see the release notes. To find your installed version and see if you need to update, run
Install or update
The MSI distributable is used for installing or updating the Azure CLI on Windows. You don't need to uninstall any current versions before using the MSI installer.
When the installer asks if it can make changes to your computer, click the "Yes" box.
You can also install the Azure CLI using PowerShell. Start PowerShell as administrator and run the following command:
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
This will download and install the latest version of the Azure CLI for Windows. If you already have a version installed, it will update the existing version. After the installation is complete, you will need to reopen PowerShell to use the Azure CLI.
You can now run the Azure CLI with the
az command from either Windows Command Prompt or PowerShell. PowerShell offers some tab completion features
not available from Windows Command Prompt. To sign in, run the az login command.
If the CLI can open your default browser, it will do so and load an Azure sign-in page.
Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
Sign in with your account credentials in the browser.
To learn more about different authentication methods, see Sign in with Azure CLI.
Here are some common problems seen when installing on Windows. If you experience a problem not covered here, file an issue on GitHub.
Proxy blocks connection
If you can't download the MSI installer because your proxy is blocking the connection, make sure that
you have your proxy properly configured. For Windows 10, these settings are managed in the
Settings > Network & Internet > Proxy pane. Contact your system administrator for the required settings,
or for situations where your machine may be configuration-managed or require advanced setup.
These settings are also required to be able to access Azure services with the CLI, from both PowerShell or the Command Prompt. In PowerShell, you do this with the following command:
(New-Object System.Net.WebClient).Proxy.Credentials = ` [System.Net.CredentialCache]::DefaultNetworkCredentials
In order to get the MSI, your proxy needs to allow HTTPS connections to the following addresses:
If you decide to uninstall the Azure CLI, we're sorry to see you go. Before you uninstall, use the
az feedback command to let us know
what could be improved or fixed. Our goal is to make the Azure CLI bug-free and user-friendly. If you found a bug, we'd appreciate it if you file a GitHub issue.
You uninstall the Azure CLI from the Windows "Apps and Features" list. To uninstall:
|Windows 10||Start > Settings > Apps|
|Start > Control Panel > Programs > Uninstall a program|
Once on this screen type Azure CLI into the program search bar. The program to uninstall is listed as Microsoft CLI 2.0 for Azure. Select this application, then click the
Now that you've installed the Azure CLI, take a short tour of its features and common commands.