Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions docs-ref-conceptual/install-azure-cli-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ keywords: Install azure cli, azure cli download, cli for windows, install azure

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, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell.
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](install-azure-cli.md)
for the list of supported package managers or how to install manually under WSL.

[!INCLUDE [current-version](includes/current-version.md)]

## Install or update

The MSI distributable is 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.
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**.
Expand All @@ -36,10 +36,10 @@ The MSI distributable is used for installing or updating the Azure CLI on Window
Download and install the latest release of the Azure CLI. When the installer asks if it can make changes to your computer, select the "Yes" box.

> [!div class="nextstepaction"]
> [Latest release of the Azure CLI (32-bit)](https://aka.ms/installazurecliwindows)
> [Latest MSI of the Azure CLI (32-bit)](https://aka.ms/installazurecliwindows)

> [!div class="nextstepaction"]
> [Latest release of the Azure CLI (64-bit)](https://aka.ms/installazurecliwindowsx64)
> [Latest MSI of the Azure CLI (64-bit)](https://aka.ms/installazurecliwindowsx64)

If you have previously installed the Azure CLI, running either the 32-bit or 64-bit MSI will overwrite an existing installation.

Expand Down Expand Up @@ -97,6 +97,37 @@ You can also use `winget`, Microsoft's Package manager for Windows, to install a

The `-e` 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 `-v <version>` with your desired version to the command.

# [ZIP Package](#tab/zip)

> [!IMPORTANT]
> This package is currently in preview.

You can use the ZIP package to install the Azure CLI on Windows. This package is useful when you don't have administrative privilege.

Unzip the package to a folder, then using Cmd or PowerShell, call the Azure CLI by running `<unzipped folder path>\bin\az.cmd`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #4045 (comment), I suggest we do mention how to call it if the path contains space - in both CMD and PowerShell.

Copy link
Contributor Author

@bebound bebound Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The space doc is removed for two reasons:

  1. In general, the simplest way to call az is adding it into PATH.
  2. If the user chooses to use the full path with spaces, they must know how to correctly do so in Windows. (After all, this problem is not introduced by az.)

(The command to call path with spaces is not unified in CMD and PS. I want to keep our doc concise. If many users report this issue in the future, we may add it then.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @jiasli. I don't feel it is possible to have too much clarity. Is is possible to have too many words! :-)

Our install docs receive the most negative feedback of any doc group in our repo, so I prefer not to wait for a customer complaint.


If you want to run the `az` command directly, follow the steps below to add the Azure CLI to your `PATH` environment variable.
1. Open the Start Menu and search for `environment variables`. Click `Edit the system environment variables`.
1. Click the `Environment Variables...` button.
1. In the `User varibles for <username>` box, select `Path` and click the `Edit...` button.
1. Click the `New` button and add the `<unzipped folder path>\bin` to the list.
1. **Restart your terminal.** You should now be able to run `az` commands.

### Latest version

> [!div class="nextstepaction"]
> [Latest ZIP of the Azure CLI (64-bit)](https://aka.ms/installazurecliwindowszipx64)

### Specific version

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](./release-notes-azure-cli.md). The ZIP package is available from version 2.57.0. Only 64-bit is available.

---

## Run the Azure CLI
Expand Down Expand Up @@ -148,6 +179,8 @@ If you have issues after migration, you can uninstall the 64-bit and reinstall t

[!INCLUDE [az upgrade](includes/az-upgrade.md)]

If you are using ZIP distribution, please delete the old installation folder and extract the new version to the _same location_.

## Uninstall

[!INCLUDE [uninstall-boilerplate.md](includes/uninstall-boilerplate.md)]
Expand Down