Azure CLI running in Powershell becomes unresponsive
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Related command
All az command lines do not work.
Describe the bug
I recently faced a tricky problem with the azure cli that I run any “az…” command in powershell and no respond, like the image below.
At first, I thought that there was a problem because anaconda was installed. Later, I uninstalled anaconda and found that it was still the same. I don't know where the problem is. I have tried to see if there is anyone with a similar problem to me but I have not found. I've also tried uninstalling or repairing the Azure CLI, and reinstalling a different or the same version(2.38.0 or 2.39.0), but it didn't work.
To Reproduce
I can't help you reproduce, because only my computer has such a problem, my colleagues are normal. I had this problem suddenly.
Expected behavior
I want all az command line to work fine.
Environment summary
Install Method: MSI Version: 2.38.0 or 2.39.0 OS version: Windows11 Shell Type: Powershell
Additional context
@jiasli for awareness
What's the output of (gcm az).Source in PowerShell?
You may need to delete this azure-cli package.
What's the output of
(gcm az).Sourcein PowerShell? You may need to delete this azure-cli package.
It's strange that this command displays "fatal" in Powershell, but a path is displayed in Anaconda Powershell Prompt , so it still has something to do with downloading Anaconda?
- Powershell:

- Anaconda Powershell Prompt:

By the way, which package do you say should be removed? Is the C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2?
Does az works on Anaconda PowerShell or cmd.exe?
Looks like cli is successfully installed but your PowerShell is down.
Does
azworks on Anaconda PowerShell or cmd.exe? Looks like cli is successfully installed but your PowerShell is down.
At first, I couldn't open cmd.exe. Then, I encountered a similar problem to me. It was also because of frequent installation and uninstallation of Anaconda that cmd.exe could not be opened, so I followed the following method.
Now not only can cmd.exe be opened, all the az commands can also work fine too.
Thanks for you help~