-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use az upgrade
in quiet mode
#16617
Comments
hi @fengzhou-msft could you pls share the config to silently upgrade? thanks |
You can use BTW, for the command to update MSI quietly, you need to start the Powershell as admin. |
@fengzhou-msft I tried using PS and CMD as admin and ran the below without success. It started the MSI dialog and asked me to accept the license and click next to continue as mentioned in the issue description. |
@jiasli Any updates on this issue? I'm trying to setup an automated process to update our self-hosted Azure DevOps agents. This 'accept license->next' is the only stopper that remains for us. Thx |
Same here. I need the ability to update agents without user interaction. |
Hello, |
Same here. Managing servers where Azure CLI needs updating is nightmare - cannot be automated. |
Yes please. Probably we need an az upgrade -y --all --only-show-errors --accepteula Ubuntu users get to install and update |
I need to fix #22741 first. |
Reviewing this issue again, I found that the UAC windows during installation is required for non-admin user. For admin user, you can use this command to update CLI to latest version without prompt, then run |
@bebound the problem is that even an admin user using the CLI must still check a box in a dialog to accept the license, which means admin users can't automate the use of the CLI to update update az across multiple machines with e.g. |
@ncook-hxgn Hey, I update my previous comment a bit. Does this command solve the problem? |
@bebound I'll give it a go, but it feels like a workaround |
This is very annoying, I can't update all my agents remotely. |
@toby-freemarket Please try #16617 (comment) |
I've tried this command as admin, but it doesn't work. The msiexec process starts, but it seems to hang and never actually installs/updates anything, and eventually dies. |
@jasonfy2k This should not happen. Do you have any system policy prevents the MSI installation, are you able to install the MSI manually as admin? |
@bebound my mistake, I was running the process under the wrong user. It would still be nice to have a native flag built-in to handle this, but your solution works for me, thank you :) |
Is your feature request related to a problem? Please describe.
I'd like to use
az upgrade
without the need of human intervention on Windows.Currently, running
az upgrade -y --all
still prompts a dialog where you have to accept license and click on next.Describe the solution you'd like
az upgrade --yes --all --quiet
upgrades all the az cli quietly, without any dialog or human interaction.Describe alternatives you've considered
Scratch that, I just tried and it doesn't work for updating from 2.16.0 to 2.18.0.Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi
would be doable, but it is way less elegant, and not cross platform.The text was updated successfully, but these errors were encountered: