Skip to main content
Guides Menu

How to Install Azure CLI on Windows

Install Azure CLI on Windows so you can sign in with az login, manage Azure resources, and script Azure tasks from any terminal.

Vishal Hulawale
April 2026·5 min read

Supported Versions

2 (latest)

Official Source

microsoft.com (official)

Environment Setup

1 PATH entry

Verify Step

az --version

DevTools Installer is not affiliated with, endorsed by, or sponsored by the publisher of Azure CLI. All product names and logos are trademarks of their respective owners. Downloads are sourced directly from the official publisher.

Install With DevTools Installer

Use this path if you want DevTools Installer to download the official package and handle the Windows setup for you.

  1. 1Open DevTools Installer.
  2. 2In Cloud & DevOps, select "Azure CLI".
  3. 3Click "Install Selected".
  4. 4Let the installer download the official MSI and run it silently.
  5. 5Open a new terminal window after the install finishes.
  6. 6Run to confirm the CLI is available, then run to sign in.

Download Source

DevTools Installer downloads from the official publisher:

https://aka.ms/installazurecliwindowsx64

PATH & Environment Variables

DevTools Installer sets the following automatically:

PATH entries

C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin

Verification

DevTools Installer verifies the install by running:

az --version

Expected output: azure-cli 2.x.x

Manual Installation Steps

Use these steps if you want to run the installer yourself and apply the Windows PATH or environment changes manually.

  1. 1Download the official installer from https://aka.ms/installazurecliwindowsx64
  2. 2Run the MSI installer.
  3. 3The installer adds to PATH automatically.
  4. 4Open a new terminal and run .
  5. 5Run or to authenticate before you use Azure commands.

Need to upgrade, downgrade, or remove Azure CLI?

DevTools Installer can also upgrade Azure CLI to a newer version, roll back to an older one, or cleanly uninstall it — including PATH entries and environment variables. No manual cleanup required.

What Is Azure CLI Used For?

  • Managing Azure resources — VMs, App Services, storage accounts, and databases from the command line.
  • Deploying infrastructure with ARM templates or Bicep files via Azure CLI commands.
  • Configuring and managing Azure Kubernetes Service (AKS) clusters.
  • Automating Azure operations in CI/CD pipelines and deployment scripts.
  • Querying Azure Resource Graph for cross-subscription resource inventory and compliance checks.

Common Issues And Fixes

Check the problem and the exact fix before you reinstall anything. Some guides also include the reason the issue happens.

Problem

"az" is not recognized after installation

Exact fix

Azure CLI installs to C:\Program Files\Microsoft SDKs\Azure\CLI2. The wbin subfolder is added to PATH. Close and reopen your terminal.

Problem

"az login" opens a browser but authentication fails

Exact fix

Ensure your browser is not blocking pop-ups for login.microsoftonline.com. Alternatively, use "az login --use-device-code" to authenticate via a code in any browser.

Problem

Azure CLI is slow to respond or times out

Exact fix

Check your network connection and proxy settings. Configure proxy: "az configure --defaults proxy=http://proxy:port". Also ensure you are authenticated — some commands stall when credentials are expired.

Problem

Multiple Azure subscriptions cause confusion

Exact fix

Run "az account list --output table" to see all subscriptions. Switch with "az account set --subscription <name-or-id>".

Tips for Azure CLI

  • After installing, run "az login" to authenticate. Your credentials are cached locally for future sessions.
  • Use "az interactive" for an enhanced shell experience with auto-complete and inline documentation.
  • Azure CLI extensions add support for preview services: "az extension add --name <ext>" to install.
  • If you work with both Azure and AWS, both CLIs coexist without conflict — they use separate command names and credential stores.

Related Guides

Back to All Guides