azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Azure CLI running in Powershell becomes unresponsive

Open TYW-0203 opened this issue 4 years ago • 5 comments

az feedback auto-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. image 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

TYW-0203 avatar Aug 16 '22 02:08 TYW-0203

@jiasli for awareness

yonzhan avatar Aug 16 '22 03:08 yonzhan

What's the output of (gcm az).Source in PowerShell? You may need to delete this azure-cli package.

bebound avatar Aug 17 '22 02:08 bebound

What's the output of (gcm az).Source in 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:

image

  • Anaconda Powershell Prompt:

image

By the way, which package do you say should be removed? Is the C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2?

TYW-0203 avatar Aug 17 '22 03:08 TYW-0203

Does az works on Anaconda PowerShell or cmd.exe?

Looks like cli is successfully installed but your PowerShell is down.

bebound avatar Aug 17 '22 07:08 bebound

Does az works 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. image Now not only can cmd.exe be opened, all the az commands can also work fine too. Thanks for you help~

TYW-0203 avatar Aug 17 '22 08:08 TYW-0203