The Azure Command-Line Interface (CLI) is a cross-platform command-line tool that can be installed locally on Windows computers. You can use the Azure CLI for Windows to connect to Azure and execute administrative commands on Azure resources. The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container.
For Windows, the Azure CLI is installed via an MSI or a ZIP package, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell.
When you perform an installation 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.69.0. For information about the latest release, see the release notes. To find your installed version and see if you need to update, run az version.
Install or update
The MSI and ZIP distributable are used for installing or updating the Azure CLI on Windows. You don't need to uninstall current versions before using the MSI installer because the MSI updates any existing version.
Important
After the installation is complete, you will need to close and reopen any active terminal window to use the Azure CLI.
WinGet (Windows Package Manager)
Use WinGet, Microsoft's Package manager for Windows, to install and manage updates for Azure CLI. By default, Winget installs the 64-bit Azure CLI on 64-bit operating systems.
Note
WinGet is available by default in Windows 11 and modern versions of Windows 10. However, it may not be installed in older
versions of Windows. See the winget documentation for installation instructions.
winget install --exact --id Microsoft.AzureCLI
The --exact option is to ensure the official Azure CLI package is installed. This command installs the latest version by default. To specify a version, add a --version <version> with your desired version to the command. Here's an example:
If you have previously installed the Azure CLI, running either the 32-bit or 64-bit MSI will overwrite an existing installation.
Specific version
If you prefer, you can download a specific version of the Azure CLI by using a URL.
To download the MSI installer for a specific version, change the version segment in URL https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>.msi (32-bit) or https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>-x64.msi (64-bit).
For example, to install the 32-bit MSI of Azure CLI version 2.51.0, your URL would be https://azcliprod.blob.core.windows.net/msi/azure-cli-2.51.0.msi. The corresponding 64-bit install would be https://azcliprod.blob.core.windows.net/msi/azure-cli-2.51.0-x64.msi.
Available Azure CLI versions can be found at Azure CLI release notes. The 64-bit MSI is available from version 2.51.0.
Microsoft Installer (MSI) with PowerShell
To install the Azure CLI using PowerShell, start PowerShell as administrator and run the following command:
This will download and install the latest 32-bit installer of the Azure CLI for Windows. If you prefer a 64-bit install, change URL to https://aka.ms/installazurecliwindowsx64. If the Azure CLI is already installed, the installer will overwrite the existing version.
To install a specific version, replace the -Uri argument with the URL described in the next section. Here is an example of using the 32-bit installer of the Azure CLI version 2.51.0 in PowerShell:
To download the MSI installer for a specific version, change the version segment in URL https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>.msi (32-bit) or https://azcliprod.blob.core.windows.net/msi/azure-cli-<version>-x64.msi (64-bit).
For example, to install the 32-bit MSI of Azure CLI version 2.51.0, your URL would be https://azcliprod.blob.core.windows.net/msi/azure-cli-2.51.0.msi. The corresponding 64-bit install would be https://azcliprod.blob.core.windows.net/msi/azure-cli-2.51.0-x64.msi.
Available Azure CLI versions can be found at Azure CLI release notes. The 64-bit MSI is available from version 2.51.0.
Syntax differences between Bash and PowerShell
Although most Azure CLI documentation is written and tested in a Bash shell, you can also install and run the Azure CLI using PowerShell. There are subtle syntax differences between Bash and PowerShell. Review these articles to avoid scripting errors:
When running the Azure CLI in PowerShell, there are also error handling differences and the ability to enable tab completion. See these articles for more information:
If you prefer, you can download a specific version of the Azure CLI by using a URL.
To download the ZIP package for a specific version, change the version segment in URL https://azcliprod.blob.core.windows.net/zip/azure-cli-<version>-x64.zip.
For example, to install the 64-bit ZIP of Azure CLI version 2.57.0, your URL would be https://azcliprod.blob.core.windows.net/zip/azure-cli-2.57.0-x64.zip.
Available Azure CLI versions can be found at Azure CLI release notes. The ZIP package is available from version 2.57.0. Only 64-bit is available.
Run the Azure CLI
After installation, close and reopen any active terminal window. Run the Azure CLI with the az command from either Windows Command Prompt or PowerShell. A common first step is to check your active subscription.
az account show
Troubleshooting installation
Here are some common problems seen when installing the Azure CLI on Windows. If you experience a problem not covered here, file an issue on GitHub.
PATH variable not set
The most common cause of this problem is that the active terminal window has not been restarted after installation. Close and reopen any active terminal window.
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.
Important
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:
Tab completion, also known as "Azure CLI completers", provides completion on inputs to provide hints, enable discovery and speed up input entry. Command names, command group names, parameters and certain parameter values can be automatically inserted into the command line by pressing the Tab key.
Tab completion is enabled by default in Azure Cloud Shell and in most Linux distributions. Starting in Azure CLI version 2.49, you can enable tab completion for the Azure CLI in PowerShell. Follow these steps:
To display all available options in the menu, add Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete to your PowerShell profile.
Update the Azure CLI
Beginning with version 2.11.0, the Azure CLI provides an in-tool command to update to the latest version.
az upgrade
This command also updates all installed extensions by default. For more az upgrade options, see the command reference page. For Azure CLI versions prior to 2.11.0, update by reinstalling as described in Install the Azure CLI.
If you are using ZIP distribution, please delete the old installation folder and extract the new version to the same location.
Migrate to 64-bit Azure CLI
Starting from 2.51.0, Azure CLI also provides 64-bit MSI which is recommended for better performance.
Follow these steps to migrate to Azure CLI 64-bit:
Check your current CLI version and installed extensions by running az --version.
Extensions will need to be reinstalled. It is recommended to perform a backup of the current extension folder %userprofile%\.azure\cliextensions by renaming it in case you choose to revert back to 32-bit. This folder is created automatically when you reinstall an extension.
Download and install latest 64-bit installer as described in Install or update. The 32-bit MSI will be automatically uninstalled.
Install extensions by running az extension add --name <extension> --version <version>. If you don't want to reinstall extensions manually, the Azure CLI will prompt you to install an extension on first use. For more information on installing extensions, see How to install extensions.
If you have issues after migration, you can uninstall the 64-bit and reinstall the 32-bit MSI. If you have made a backup of your 32-bit extension folder, restore (rename) your extension folder after the change.
Uninstall
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:
Platform
Instructions
Windows 11
Start > Settings > Apps > Installed apps
Windows 10
Start > Settings > Apps > Apps & Features
Windows 8 and Windows 7
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 select the Uninstall button.
Remove data
If you don't plan to reinstall Azure CLI, remove its data from C:\Users\<username>\.azure\msal_token_cache.bin or C:\Users\<username>\.azure\msal_token_cache.json.
Next Steps
Now that you've installed the Azure CLI on Windows, learn about the different ways to sign in.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: