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.
Supported Versions
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.
- 1Open DevTools Installer.
- 2In Cloud & DevOps, select "Azure CLI".
- 3Click "Install Selected".
- 4Let the installer download the official MSI and run it silently.
- 5Open a new terminal window after the install finishes.
- 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.
- 1Download the official installer from https://aka.ms/installazurecliwindowsx64
- 2Run the MSI installer.
- 3The installer adds to PATH automatically.
- 4Open a new terminal and run .
- 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
kubectl
Install kubectl on Windows so you can connect to a Kubernetes cluster, inspect resources, and run kubectl commands from any terminal.
Helm
Install Helm on Windows so you can deploy Kubernetes charts, manage releases, and use helm commands against a cluster that kubectl can already reach.
AWS CLI
Install AWS CLI on Windows so you can run aws commands, configure credentials, and manage AWS resources without using the browser console for every task.