When installing Azure CLI tool on Windows 10 or 11 directly via Windows installer, you may encounter this error - cannot find the path specified.
Solution
Azure CLI requires Administrator permission when installing. You can follow these steps to fix the above error.
- Go to the folder that contains your downloaded Azure CLI installer. For example, azure-cli-2.43.0.msi.
- Click Filein the menu and then click Open Windows PowerShell -> Open Windows PowerShell as administrator.
- In the opened PowerShell terminal, run the downloaded msi file like the following screenshot shows:
- Follow the installer to complete the setup.
Once the installation is completed, you can type command az version in any terminal to verify:
az --version
azure-cli 2.43.0
core 2.43.0
telemetry 1.0.8
Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\fahao\.azure\cliextensions'
Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.