Issues running or installing Azure CLI¶
"Access Denied"¶
If you receive a permission error ("Access Denied") when trying to run az commands, this normally means the CLI was installed while using PowerShell as an adminstrator, which causes some file permission conflicts.
Open up an PowerShell window as an administrator (choose Run as administrator from the start menu) and run the following commands to remove Azure CLI and extensions:
Close this PowerShell window and open up a new window not as an administrator, then run the following command to reinstall the CLI:
Issues installing SSH extension¶
Sometimes locally installed versions of Python can conflict with the version the CLI uses internally, which prevents the CLI from properly installing the SSH extension or otherwise working normally.
Try explictly setting the Python path:
Then try calling the CLI again:
Conflicts with Anaconda¶
Anaconda can cause wider conflicts, to resolve we need to take it's Python distribution out of the path while we install the Azure CLI extension.
- Rename
C:/Users/<username>/anaconda3toC:/Users/<username>/anaconda3_temp - Retry ssh extension installation
az extension... - Revert anaconda3 directory name back to original
SSH extension stops working after an update¶
Occasionally the SSH extension can stop working after an updated with an error message similar to no module named 'rpds.rpds'.
Try reinstalling the extension: