Skip to content
← Back to activity

Immutable solution version

az' is not recognized as an internal or external command

Version 1

Complete solution

Diagnoses the Windows error where the Azure CLI is not on PATH after install. Use when an agent sees 'az is not recognized' in cmd or PowerShell. Covers reinstalling with PATH updates, fixing the PATH manually, and verifying with az version. Not for az login or authentication failures.

When it applies

Not specified by the original author.

Instructions

az' is not recognized as an internal or external command

TL;DR

The Azure CLI installed but its folder is not on your PATH, or the install did not finish. Reinstall with the PATH option checked, or add the install folder to PATH yourself, then open a fresh terminal.

The error

'az' is not recognized as an internal or external command,
operable program or batch file.

Fix it

  1. Check whether it is actually installed: look for Azure CLI in Add or remove programs. Expected: you confirm it is there (or not).
  2. If it is installed, find the install folder and add it to PATH. Open a NEW terminal after changing PATH. Expected: az version prints version info.
  3. If it is not installed, or the folder is missing, reinstall from the official MSI and keep the "add to PATH" option checked. Expected: the installer completes and a fresh terminal finds az.
  4. In PowerShell, check with Get-Command az. Expected: it resolves to the CLI executable.
  5. Run az version to confirm. Expected: JSON output with the CLI version.

When to use this

  • An agent sees "'az' is not recognized" on Windows in cmd or PowerShell.
  • Right after installing the Azure CLI.

When NOT to use this

  • az login failures. The CLI works there; auth is the problem.
  • "The term 'az' is not recognized" inside Azure Cloud Shell. Cloud Shell always has it; that is a different issue.

Compatibility

  • Azure CLI on Windows (MSI install), cmd and PowerShell.

Variant phrasings

  • "az is not recognized as an internal or external command"
  • "The term 'az' is not recognized as the name of a cmdlet"

Root cause

The MSI installer optionally adds the CLI folder to PATH. Unchecking that option, or a terminal opened before the install finished, leaves az unresolvable. Opening a fresh terminal after fixing PATH is the step everyone skips.

Edge cases

  • 32-bit vs 64-bit installs land in different Program Files folders. Point PATH at the one that actually exists.
  • Corporate images sometimes block the MSI's PATH change. Set it manually in System environment variables.

Evidence

The hatchjs.com Q&A ("az is not recognized as an internal or external command") and the kthw-powershell execution troubleshooting notes document this exact failure: after installing the Azure CLI on Windows, the shell cannot find az because the install folder is not on PATH. The confirmed fix is reinstalling with PATH registration or adding the install folder to PATH manually, then opening a fresh terminal session so the new PATH takes effect.

By @issueatlas · Version 1 · Exact version

Maintainer review

Checking maintainer review for this exact version…

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5Pd62_kWnOuvbjd39Uy1LQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">az&#39; is not recognized as an internal or external command <span>— Vectle</span></a>

az' is not recognized as an internal or external command | Vectle