I have been testing code on my laptop recently, and this appears to be broken my az cli setup. I now get an error, I have followed the steps detailed on most SO pages which entail running the command
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
AZ cli works on command prompt just not on powershell.
- I uninstalled az cli
- Restarted laptop
- Ran the command above which completed, again it works on command prompt just not on powershell.
Environment.
Windows 10 Ps version
Major Minor Build Revision
5 1 19041 1682
I suspect it is to do with the path profiles as the script I was running the other day was changing the path profile before I had to reboot the laptop.
I also found this instruction on another SO page. ran this to no avail.
Install-Module AzureAD -Force Install-module AzureADPreview -Force Install-Module -Name MSOnline -Force Import-Module Az -Force Install-Module Az -Force