To install the Azure CLI on Windows, the supported method is to download and run the MSI installer from Microsoft, or to install it with a package manager such as winget or Chocolatey. The MSI route is the simplest for most people: it installs the az command into your system and makes it available in Windows Terminal, PowerShell, and the classic Command Prompt after you open a new window. The CLI is Microsoft's cross-platform command-line tool for creating and managing Azure resources, and the Windows build is officially supported alongside the macOS and Linux builds.

What the Azure CLI Actually Is

The Azure CLI, invoked with the command az, is a command-line interface that talks to the Azure REST APIs on your behalf. Every action you can perform in the Azure portal - creating a resource group, deploying a virtual machine, uploading a file to Blob Storage, assigning a role - has a corresponding az command. Commands follow a predictable verb-first structure, so the CLI is often easier to automate than the portal or the older Azure PowerShell modules.

Three things are worth knowing before you install:

  • It is separate from Azure PowerShell. The Azure CLI uses Python-style commands and outputs JSON by default; the Az PowerShell module uses PowerShell cmdlets. Pick one as your primary tool to avoid confusion.
  • It ships in two flavours. The full installer includes Python and everything the CLI needs. A separate "MSI without Python" option assumes you already have a suitable Python installation and is aimed at administrators managing dependencies centrally.
  • It runs in both 64-bit and 32-bit form. Microsoft recommends the 64-bit installer for modern Windows; the 32-bit build exists for older hardware but is not the default choice.

Prerequisites and System Requirements

The CLI runs on Windows 10 and Windows 11, and Microsoft documents support for current Windows Server releases. Before installing, check these items:

  • Architecture: 64-bit Windows is the normal case. The installer type must match your Windows architecture; mixing a 32-bit install into a 64-bit system is possible but pointless and can complicate upgrades.
  • Administrator rights: the MSI needs elevation to write to Program Files and register the az command on the system path. If you cannot elevate, the winget and Chocolatey methods also generally require an administrator shell.
  • Microsoft Installer support: a standard Windows component, present on all supported versions.
  • An Azure account: you only need this for signing in and running commands against resources, not for installing the tool itself. az version works without any account.

How to Install It, Step by Step

The most reliable path is the official MSI. The sequence is short:

  1. Open the Microsoft Learn page for the Azure CLI and choose the Windows installation tab. Download the 64-bit MSI from the official Microsoft download link. Avoid mirror sites and third-party bundles.
  2. Run the downloaded file. Windows SmartScreen may show a warning for a freshly published installer; confirm the publisher is Microsoft before proceeding.
  3. Accept the licence terms and continue through the wizard. The default install location under Program Files is fine for almost everyone.
  4. Finish the wizard and close every open terminal window. The installer adds az to the system path, and existing shells do not pick up that change.
  5. Open a new Windows Terminal, PowerShell, or Command Prompt window and run az version. You should see the CLI core version and the list of installed extension versions.
  6. Run az login. A browser window opens for interactive sign-in; after you authenticate, choose the subscription you want active with az account set --subscription "<name or id>".

The winget alternative is one command in an elevated shell: winget install -e --id Microsoft.AzureCLI. Chocolatey users can run choco install azure-cli. Both package managers pull the same official Microsoft package, then require the same new-terminal step before az works.

Which Installation Method Should You Choose

There is no single right answer, but the trade-offs are clear:

  • MSI installer: best for individual workstations, one-off installs, and machines where you want a self-contained tool with no PowerShell or Python prerequisites. Upgrades are manual unless you script them.
  • winget: best for Windows 10 and 11 users who already use App Installer. It handles upgrades with winget upgrade and keeps the install reproducible.
  • Chocolatey: suited to organisations already managing software through Chocolatey, where Azure CLI is simply one more package in the catalogue.
  • MSI without Python: only for admins who deliberately control Python versions, for example on build agents.

One practical point: pick a method and stay with it. Mixing an MSI install with a later Chocolatey install can leave two registrations on the path and a confusing az version.

Common Problems and How to Fix Them

Most installation troubles fall into a handful of categories:

  • "az is not recognized" right after install. Almost always an old terminal session. Close all terminal windows and open a fresh one. If it still fails, check that the az directory was added to the system PATH.
  • Permission or elevation errors. Run the installer or package manager command from an administrator shell. Non-admin installs to the user profile are not how the official MSI behaves.
  • A blocked or quarantined installer. Corporate endpoint protection can block executables from new sources. Ask your IT team to allow the Microsoft-signed installer rather than disabling protection yourself.
  • An outdated version. The CLI is updated frequently, and some commands change or move to extensions. Run az upgrade to move to the latest release where that mechanism exists, or re-download the current MSI.
  • Sign-in failures behind a proxy. az login opens a browser and listens on a local port. Locked-down networks and proxies can break that callback; the documented alternative is signing in with a device code or a service principal.

A common misconception deserves its own note: the Azure CLI is not a graphical portal replacement, and it does not store your credentials as plain text in a file. Credentials are cached in a protected profile directory, and az logout clears them. Do not copy that cache between machines.

Everyday Commands Once Installed

The best way to confirm the install is healthy is to run a few harmless commands:

  • az version - shows the CLI core version and installed extensions.
  • az login - interactive sign-in through the browser.
  • az account show - confirms which subscription is active.
  • az group list --output table - lists resource groups in readable tabular form.
  • az find "create vm" - searches the CLI reference for relevant commands.

The default output is JSON, which suits automation. Adding --output table or --output jsonc makes the result human-readable while you are learning the command structure.

Costs, Licensing and Safety

The Azure CLI itself is free to download and use, and it is licensed under an open-source licence that Microsoft publishes. Installing it costs nothing, and there is no paid tier, account requirement to download, or usage fee. What costs money is Azure itself: the resources you create from the CLI are billed exactly as if you had created them in the portal. A single mistyped command can provision an expensive resource, so use --what-if where supported, review resource group scope carefully, and consider spending limits on test subscriptions.

On the safety side, treat your signed-in session as you would a portal login. Never paste secrets into commands that get logged, prefer service principals or managed identities for automation, and sign out on shared machines. The CLI asks for confirmation on destructive operations such as deleting a resource group, but that prompt is not a substitute for knowing which subscription is active.

Frequently Asked Questions

Do I need Python installed to use the Azure CLI? No. The standard Windows MSI bundles its own Python runtime. Only the separately published "MSI without Python" build assumes an existing Python installation, and it is intended for administrators who manage Python themselves.

Why does the az command not work after I installed it? The most common cause is an existing terminal window that predates the install. Close every terminal and open a new one, then run az version. If it still fails, confirm the install directory appears in your system path.

Can I install the Azure CLI without administrator rights? The official MSI is a system-wide install that requires elevation. If you lack admin access, ask IT to approve or deploy it; do not rely on unofficial portable copies.

How do I update the Azure CLI on Windows? Run az upgrade from an elevated terminal where supported, or download and run the latest MSI installer. Package manager installs can be updated through their own upgrade commands.

Is the Azure CLI the same as Azure PowerShell? No. They are separate tools that talk to the same Azure APIs using different command syntax. Both work on Windows, and you can install both, but most teams standardise on one for scripts and documentation.

Does the CLI need internet access to run? Yes for almost everything, since it calls Azure APIs. Installation and the version command work offline, but sign-in and resource commands require connectivity.