Skip to content

Windows Mode

  • News
  • Current Page Parent Microsoft Azure
  • Download Windows Apps
  • Windows Gaming
  • AI for Windows
  • Tutorials
  • Windows Server

Home » Microsoft Azure » Azure CLI for Windows: Install, Sign In and First Commands

Azure CLI for Windows: Install, Sign In and First Commands

October 28, 2026 Adam LaFoute
Share

Azure CLI on Windows cover art with Install, Sign In and Run Your First Commands steps beside Windows Terminal windows running az find, az version and az login under the Azure logo

Three steps to the Azure CLI on Windows: install it, sign in with az login, and run your first commands.

The Azure CLI is Microsoft’s free command-line tool for managing Azure, and you can install it on Windows with one winget command or a regular installer from Microsoft Learn. You type short commands that start with az, and Azure creates, lists, changes or deletes things for you.

Anything you can click in the Azure portal, you can also type. A command you type once can be saved, repeated and shared, which a series of clicks cannot. That is why admins and developers reach for it as soon as a task repeats.

It runs in PowerShell, Command Prompt and Windows Terminal on Windows 10 and Windows 11, and it brings its own copy of Python, so there is nothing else to install.

Below: three ways to install it, how to sign in, your first commands, and fixes for the errors beginners hit most. Stuck on a step? Reach out to us directly.

Price
Free
Works on
Windows 10 and 11
Runs in
PowerShell, Command Prompt
Install
winget, MSI or ZIP
Get the Azure CLI for Windows →Try It in Cloud Shell

Table of Contents

Toggle
  • What Is the Azure CLI?
  • How to Install the Azure CLI on Windows
  • Check That the Install Worked
  • Sign In With az login
  • Find Your Way Around the Azure CLI
  • Your First Azure CLI Commands
  • Azure CLI vs Azure PowerShell vs the Portal
  • Keep the Azure CLI Up to Date
  • Common Azure CLI Errors and Fixes
  • Tips for Getting Started
  • How to Uninstall the Azure CLI
  • Frequently Asked Questions
  • Support and Community

What Is the Azure CLI?

CLI stands for command-line interface: a program you control by typing instead of clicking. The Azure CLI gives you one command, az, followed by the service you want and what to do with it. For example, az vm list lists your virtual machines.

Behind the scenes, every command talks to Azure Resource Manager (the service that handles every create, change and delete in Azure), the same one the portal uses. So a resource made from the command line shows up in the portal right away, and the other way round.

The tool itself is free and open source. You only pay for the Azure resources you create with it, at the same price as creating them in the portal.

New to Azure? Our beginner’s guide to Microsoft Azure explains subscriptions, resource groups and the portal in plain words. Read it first if those terms are new.

How to Install the Azure CLI on Windows

Pick one method. Winget is the quickest, the MSI suits people who prefer a normal installer, and Cloud Shell needs no install at all.

Option 1: winget (recommended)

Winget is the Windows Package Manager, a tool built into Windows 11 and modern versions of Windows 10. It installs the 64-bit Azure CLI on a 64-bit PC and makes later updates one command.

1 Open Windows Terminal or PowerShell. Right-click the Start button and choose Terminal.

2 Run the install command shown below and wait for it to finish.

3 Close the terminal and open a new one. The az command only works in windows opened after the install.

winget install --exact --id Microsoft.AzureCLI

Why –exact? It makes sure winget installs the official Microsoft package and not a lookalike with a similar name.

Option 2: the MSI installer

64-BIT RECOMMENDED

Download and double-click

Get the 64-bit MSI from the Azure CLI install page on Microsoft Learn, run it, and select Yes when Windows asks for permission. Running a newer MSI later updates your existing install, so there is no need to uninstall first.

SILENT INSTALL

Prefer a script?

Microsoft also gives a PowerShell snippet that downloads the MSI and installs it silently. Run PowerShell as administrator and use the 64-bit link, aka.ms/installazurecliwindowsx64, since the older aka.ms/installazurecliwindows link gets the 32-bit build.

$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindowsx64 -OutFile .\AzureCLI.msi
Start-Process msiexec.exe -Wait -ArgumentList '/I', 'AzureCLI.msi', '/quiet'
Remove-Item .\AzureCLI.msi

Option 3: no install, with Azure Cloud Shell

Azure Cloud Shell is a terminal that runs in your browser with the Azure CLI already installed and signed in. Open it from the shell icon at the top of the Azure portal or at shell.azure.com, and pick Bash or PowerShell.

The machine behind Cloud Shell is free. Choose No storage account required for a quick session that keeps nothing, or attach a storage account (normal storage charges apply) if you want your files to stay between sessions.

Which Install Method Fits You
From Microsoft Learn. Checked October 2026
Method Best for Admin rights Good to know
winget Most people on Windows 10 or 11 Yes Installs 64-bit by default; update later with winget upgrade or az upgrade
MSI installer People who prefer a normal setup wizard, or IT scripts Yes Pick the 64-bit MSI; it overwrites any older install
ZIP package Locked-down PCs with no admin rights No A preview package, 64-bit only; you add its bin folder to your PATH yourself
Cloud Shell Trying the CLI, or working from someone else’s PC No Runs in the browser and is always signed in; nothing touches your PC

Already have the 32-bit version? Microsoft recommends the 64-bit build for better speed. Installing the 64-bit MSI removes the 32-bit one, but extensions need reinstalling afterwards.

Check That the Install Worked

Open a new terminal window and run az version. If you see a short list of version numbers, the Azure CLI is installed and ready.

az version
Windows Terminal running az version, which lists the installed azure-cli, azure-cli-core and telemetry versions and no extensions
az version on our test PC. The empty extensions list is normal on a fresh install.

Sign In With az login

Most commands need to know who you are. Run az login and sign in with the account you use for the Azure portal.

az login
WINDOWS

Windows sign-in window

On Windows 10 and 11, az login opens a Windows sign-in window instead of a browser tab. It uses Web Account Manager (the part of Windows that handles work and school accounts), so Windows Hello, security keys and single sign-on work.

AFTER SIGN-IN

Pick a subscription

If your account can reach more than one subscription (a billing container for Azure resources), the CLI lists them with numbers. Type a number and press Enter, or just press Enter to keep the default, marked with an asterisk.

DEVICE CODE

No browser? Use a code

On a server or remote session, run az login –use-device-code. The CLI prints a code; open aka.ms/devicelogin on any device, enter the code and sign in there.

MFA is required to change anything

Azure requires multifactor authentication (a second proof of identity, such as an Authenticator app prompt) for every person who creates, changes or deletes resources from the Azure CLI. Reading works without it, but changes fail with a RequestDisallowedByPolicy error. Our guide to Azure mandatory MFA shows how to turn it on.

To see which subscription your commands will run against, or to switch to another, use these:

az account show --output table
az account list --output table
az account set --subscription "My Subscription Name"

Sign out when you are done on a shared PC: run az logout. To refresh a subscription list that looks out of date, run az account clear and sign in again.

Find Your Way Around the Azure CLI

Nobody memorizes thousands of commands. These built-in helpers find the right one for you. All of them work before you sign in.

SEARCH

Ask az find for examples

Type az find followed by a command or a few words, and it returns real example commands with links to the matching Microsoft Learn page. It is the fastest way to go from “I want to do X” to a working command.

az find is backed by an AI service that learns from Microsoft Learn and from how people use the CLI.

az find returning example commands and Microsoft Learn links for creating a resource group with az group create
HELP

Add –help to anything

Commands are arranged in groups: az vm for virtual machines, az storage for storage, az group for resource groups. Put –help after any group or command to see what it can do and which settings it takes.

az –help lists every group, and az vm create –help shows each setting plus worked examples.

Output of az vm --help in Windows Terminal showing virtual machine subgroups and commands such as create, deallocate, list and start
OUTPUT

Pick a format that fits

Results come back as JSON (structured text that scripts read easily) by default. Add –output table for a tidy table you can read at a glance, or tsv for plain values to feed into another command.

The –query setting filters results with JMESPath (a small query language for JSON), so you get only the columns you need.

az extension list-available shown with --output table, listing extension names, versions and short summaries
EXTENSIONS

Add extra commands with extensions

Some Azure services keep their commands in optional add-ons called extensions. You rarely install them by hand: the first time you run an extension command, the CLI offers to install it.

To browse them, run az extension list-available –output table. To add one yourself, use az extension add –name followed by its name.

Bottom of az --help output listing top-level commands such as find, interactive, login, logout, upgrade and version
LEARNING MODE

Try interactive mode

Run az interactive for a guided shell with autocomplete drop-downs, command descriptions and examples as you type. Press F1 to show or hide descriptions.

It installs as an extension the first time you run it, is marked as preview, and asks whether you agree to send telemetry (usage data) before it starts. Microsoft recommends PowerShell 7 for it on a local PC.

Running az interactive for the first time shows a preview notice and asks whether to send telemetry

Want Tab to finish commands for you? Tab completion is off by default in PowerShell. Microsoft’s install guide has a short block to paste into your PowerShell profile that switches it on.

Your First Azure CLI Commands

This short run creates a resource group (a folder that holds related Azure resources), checks it, and removes it again. An empty resource group costs nothing, so it is a safe first test.

1 Create a resource group called rg-cli-test in the East US region.

2 List your resource groups as a table to see the new one.

3 Delete it when you are done. –yes skips the confirmation and –no-wait hands the prompt back straight away.

az group create --name rg-cli-test --location eastus
az group list --output table
az group delete --name rg-cli-test --yes --no-wait

See your virtual machines

List every VM in the current subscription with its resource group and region.

az vm list --output table

Stop paying for an idle VM

Deallocate releases the hardware, so compute charges stop. A plain stop does not.

az vm deallocate --resource-group MyGroup --name MyVM

List everything in a group

Handy before deleting a group, to see what goes with it.

az resource list --resource-group MyGroup --output table

Find a region name

Region names in commands have no spaces, like westeurope.

az account list-locations --output table

Watch the bill as you experiment. Deleting test resources when you finish is the habit that keeps a trial cheap. Our guide to reducing Azure costs covers budgets and alerts.

Azure CLI vs Azure PowerShell vs the Portal

All three manage the same Azure. The difference is how you work: clicking, short az commands, or PowerShell cmdlets that return objects.

Which Azure Tool to Use
Same resources, three ways to reach them
Azure portal Azure CLI Azure PowerShell
How you use it Click through a website Type az commands Type cmdlets such as Get-AzVM
Runs in Any browser PowerShell, Command Prompt, Bash Windows PowerShell or PowerShell 7
Output Pages and charts JSON text, tables or plain values PowerShell objects you can pipe and sort
Feels natural if you know Nothing yet Bash or Linux scripting PowerShell
Best for Exploring and one-off tasks Quick commands and scripts that run on any OS Windows admins who already script in PowerShell

You can install both command-line tools side by side, and many admins do. If PowerShell is already your daily tool, see our guides to installing Azure PowerShell on Windows and the Azure PowerShell commands Windows admins use most.

Keep the Azure CLI Up to Date

Microsoft releases new versions often, and older ones can fail with newer Azure features and sign-in rules. Any of these updates it:

Built-in updater

Updates the CLI and, by default, every extension you have installed.

az upgrade

With winget

Works when you installed with winget. You can also just run the latest MSI over the top.

winget upgrade --exact --id Microsoft.AzureCLI

Update one extension

For an extension you added by name.

az extension update --name <extension-name>

Installed from the ZIP? Delete the old folder and unzip the new version to the same place.

Common Azure CLI Errors and Fixes

These are the problems Microsoft’s own troubleshooting notes call out, plus the one every new user meets first.

az group list returning the error Please run az login to setup account because no account is signed in
The first error almost everyone sees: a command that needs Azure, run before signing in. Run az login and try again.
PATH

az is not recognized

Windows cannot find the command. The usual cause is a terminal that was open during the install. Close every terminal window and open a new one. If you used the ZIP, check that its bin folder is in your PATH.

MFA

RequestDisallowedByPolicy

Your account has not passed MFA, so Azure blocks changes. Run az logout, then az login, and complete the MFA prompt. If that fails, update the CLI, since older versions handle MFA poorly.

SIGN-IN

User cancelled the Accounts Control Operation

The Windows sign-in window failed or was closed. To use the browser sign-in instead, run az account clear, then az config set core.enable_broker_on_windows=false, then az login.

PROXY

The MSI will not download

A proxy is blocking it. Set your proxy under Settings, Network and internet, Proxy, and make sure it allows aka.ms and azcliprod.blob.core.windows.net.

SPEED

Commands feel slow

You may still have the 32-bit build. Run az version, and if winget list shows the 32-bit package, install the 64-bit MSI, which replaces it.

SUBSCRIPTION

Wrong subscription

Commands ran against a different subscription than you expected. Check with az account show, then switch with az account set –subscription.

Tips for Getting Started

1 Use –output table while you learn. JSON is great for scripts, but a table shows what you have at a glance.

2 Run az init once. It walks you through a setup that suits you, such as interaction or automation, and explains each choice. To skip typing the same group every time, set a default with az config set defaults.group=MyGroup.

3 Mind the quotes in PowerShell. Most Microsoft examples are written for Bash. In PowerShell, wrap values that contain spaces or special characters in quotes, and use a backtick, not a backslash, to split a long command over lines.

4 Test changes with a throwaway resource group. Create it, experiment inside it, delete the whole group when you finish.

5 Let scripts sign in as an app, not as you. Automation should use a managed identity or service principal, which do not need MFA.

Keeping an eye on what you build? Our beginner’s guide to Azure Monitor explains metrics, logs and alerts, and the az monitor commands follow the same pattern you just learned.

How to Uninstall the Azure CLI

1 Open Settings, then Apps, then Installed apps. On Windows 10 it is Settings, Apps, Apps and features.

2 Search for Azure CLI. It may be listed as Microsoft Azure CLI or Microsoft CLI 2.0 for Azure.

3 Select it, then Uninstall. Or run winget uninstall --exact --id Microsoft.AzureCLI.

4 Remove leftover data if you are not coming back. Delete the .azure folder in your user folder, which holds your sign-in tokens and extensions.

Frequently Asked Questions

Do I need Python to use the Azure CLI on Windows?
No. The Windows installer brings its own copy of Python inside the Azure CLI folder, so you do not need to install Python, and the CLI does not touch any Python you already have.
Can I use the Azure CLI without an Azure subscription?
You can install it and use az version, az find and –help without an account. Anything that reads or changes resources needs you to sign in with an account that has access to a subscription.
Can I install the Azure CLI without admin rights?
Yes, with the ZIP package. Unzip it to a folder you own and run az.cmd from its bin folder, or add that folder to your user PATH. The ZIP is in preview and only comes in 64-bit.
Can I use the Azure CLI in Bash on Windows?
Yes. Install the Linux version inside Windows Subsystem for Linux (WSL) and use it from your Linux shell. It is a separate install from the Windows version, with its own sign-in.
How do I turn off Azure CLI telemetry?
Run az config set core.collect_telemetry=false. The CLI then stops sending anonymous usage data to Microsoft. az init also asks about it during setup.

Support and Community

  • Azure CLI documentation on Microsoft Learn, with the full command reference and how-to guides.
  • Azure CLI on GitHub, the open-source project from Microsoft, with release notes and the place to report bugs.
  • Microsoft Q&A for Azure, where Microsoft engineers and other users answer questions.
  • r/AZURE on Reddit, a large community for Azure questions and tips.

More Windows software guides: What Is Microsoft Azure? · Azure PowerShell · Azure PowerShell Commands · Azure Mandatory MFA · Azure Monitor · Reducing Azure Costs

Views: 197

Share this:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Reddit (Opens in new window) Reddit
  • Share on WhatsApp (Opens in new window) WhatsApp

Related Posts


Discover more from Windows Mode

Subscribe to get the latest posts sent to your email.

Tags: az loginAzure CLIAzure Cloud ShellAzure PowerShellcommand lineMicrosoft Azurewinget

Adam LaFoute

Adam is a seasoned technology expert and Microsoft specialist with over 15 years of immersion in the company's products and services. From coding and app development to cloud computing and mixed reality, his deep understanding of Microsoft's ecosystem makes him resourceful, unless you catch him in the morning without his coffee!

Share on Facebook
Share on X
  • Previous CRACK (the Egg Game) for PC: Guide, Tips & System Requirements

Add your first comment to this post

Editor’s Choice

Essential Downloads

  • 🛡️ Malwarebytes Premium for PC
  • 🟢 WhatsApp for PC
  • ⬇️ uTorrent for Windows
  • ⭐ Best Free Windows Software

Server & Power Tools

  • ☁️ Cheap Windows VPS Hosting
  • 🖥️ Download Windows Server 2025
  • 💜 Visual Studio 2026 for Windows
  • 🧑‍💻 Best AI Code Editors for PC
  • 📂 Best Free FTP Clients on Windows

Creative & Media

  • 🖌️ CorelDRAW Graphics Suite
  • 🎬 Best Video Editing Software
  • 🎞️ Best Free Media Players
  • ✨ Wallpaper Engine for PC

Productivity & AI

  • 🤖 Best Free AI Software
  • 💻 Free AI Code Editors
  • 📞 Microsoft Teams for Windows
  • ⌨️ Windows 11 Keyboard Shortcuts
  • 📚 Best Windows Resources

The Best PC Games, Apps, and News!

Join 6,100+ Microsoft Fans! 🚀 Enter your email to get the latest Windows games, software, and updates straight to your inbox!

User Online

1,400 Users Online.

2026 PC Gaming Guide

Popular Game Categories
  • 🎌 Best Anime Games
  • 💥 Best Action Games
  • 🌍 Best Adventure Games
  • 🧠 Best Strategy Games
  • 🏙 Best City Building Games
  • 🏈 Best Sports Games
  • 🎮 Best RPG Games
  • 🛠 Best Simulation Games
  • 🏎 Best Racing Games
  • 🎲 Best Party Games
  • 🎴 Best Card & Board Games
  • ♟ Best Chess & Checkers Games
Franchise & Themed Games
  • 🏰 Best Disney Games
  • 🦸 Best Marvel Games
  • 🦇 Best DC Games
  • 🧱 Best LEGO Games
  • 👻 Best Horror Games
  • 🎨 Best Indie Games
Family & Casual Games
  • 🐾 Best Pet Games
  • 🧒 Best Kids Games
  • 👑 Best Girl Games
  • 🎰 Best Casino Games
Educational Games
  • 📖 Best Educational Games
  • ➗ Best Math Games
  • 🔬 Best Science Games
  • 💻 Best Coding Games
  • 🧩 Best Puzzle & Trivia Games

Master Visual Studio Code

Start Here
  • 📥 Download & Install Guide
  • ⚡ First 10 Things To Do (Setup)
  • 🎨 20 Best VS Code Themes (Aesthetics)
  • ⌨️ VS Code Keyboard Shortcuts
Power Up (Extensions)
  • 🏆 21 Best VS Code Extensions
  • 🤖 Best AI Coding Extensions
  • 🌐 Frontend & Web Design
By Language
  • 🐍 Python Developers
  • 📜 JavaScript Developers
  • ⚙️ C++ Developers
  • 📱 React Native Apps
  • 💙 Flutter Apps
  • 📝 WordPress Developers

Latest Posts

  • Azure CLI on Windows cover art with Install, Sign In and Run Your First Commands steps beside Windows Terminal windows running az find, az version and az login under the Azure logo

    Azure CLI for Windows: Install, Sign In and First Commands

  • The CRACK logo beside a giant cracked egg in a lab, with a scientist in goggles and a face mask holding a clipboard and coworkers on scaffolding behind him

    CRACK (the Egg Game) for PC: Guide, Tips & System Requirements

  • A smiling cartoon astronaut sweeps lunar dust with an orange broom beside the Moon Sweepers logo, with a cleaning robot, solar panels, a Moon base and Earth in the sky

    Moon Sweepers for PC: Guide, Mods, Tips & System Requirements

  • A silver GEEKOM A9 Mega mini PC, a black Lenovo Legion Tower 5 gaming tower and a black Andromeda Insights workstation tower side by side on a white background

    Top 5 Windows Desktops to buy for Running AI Locally in 2026

  • An ASUS ROG Flow Z13 tablet, a GIGABYTE AORUS MASTER 16 laptop and an ASUS ROG Strix SCAR 18 laptop side by side on a light background

    Top 5 Windows Laptops to buy for Running AI Locally in 2026

Fun Windows Games

  • Resident evil requiem pc game cover - Resident Evil Requiem for PC - Download, Gameplay & Tips (2026)

    Resident Evil Requiem for PC – Download, Gameplay & Tips (2026)

  • Gameplay graphics

    Sid Meier’s Civilization VII for Windows PC: Download Guide, Tips and Features

  • Lort official cover for pc game

    LORT for Windows PC: Download Guide, 8-Player Co-op & Tips

Popular posts

  • Best itunes alternative windows

    Top 5 iTunes Alternatives for Windows PC in 2026

  • Top anime games on pc game cover - Top 15+ Anime Games on Windows PC in 2025

    Best Anime Games on PC in 2026

  • Best torrent clients on pc

    Best Free Torrent Clients for Windows in 2026 (Safe & Fast)

  • Fc 25 cover

    Download EA SPORTS FC 25 for Windows

  • Best antivirus on windows pc

    Best Antivirus for Windows in 2026 (5 Tested & Compared)

Popular Windows 11 Apps

  • Best Free Microsoft Office Alternatives in 2026 (7 Tested)

  • Trello for Windows: Desktop App, Shortcuts and Plans Explained

  • How to Run Microsoft Phi-4 Locally on Windows (Step-by-Step)

Trending Windows Themes

  • Jack o lanterns candles dark

    Halloween Theme for PC

  • Boruto anime wallpaper

    Boruto Theme for Windows PC

  • Night king cool background

    Game of Thrones Theme Pack for PC

Windows Downloads

Download Windows Themes
Download Windows Books
Download Windows Wallpapers

Windows PC Deals

Best Surface Laptops in 2026
Best Gaming Desktops to buy
Best Gaming Laptops to buy

Windows Products

Microsoft 365
Visual Studio
Visual Studio Code

About Us | Contact Us  | Meet The Team | Advertise with us | Write for us | Privacy Policy | Property of Oxavi Group Inc The Windows® Word Mark and Windows Logo are either registered trademarks, service marks or trademark in the United States and other countries. We are not affiliated with, endorsed or sponsored by the Microsoft Corporation.