Verify Azure CLI is Installed
- Try running this command in Command Prompt:
- dir "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin"
OR - dir "C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin"
- If files are listed, Azure CLI is installed but not in PATH.
- If nothing appears, Azure CLI might not be installed.
- dir "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin"
- Manually Check Installation Location
C:\Program Files\Azure CLI\wbin
OR
C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin
Install Azure CLI
- if not found in above path install from URL (64/32)
- https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-windows?pivots=msi
- Install Azure CLI on a Custom Drive
- Run the installer (Azure CLI.msi).
Update System PATH
- Open Control Panel > System > Advanced System Settings > Environment Variables.
- Under System Variables, locate Path, and click Edit.
- Click New, then add:
Restart Your Self-Hosted Agent
- If changes don’t reflect, restart your Azure DevOps self-hosted agent.
Test Again
- Open Command Prompt and try:
- where az
- az --version