winget-cli
winget-cli copied to clipboard
winget upgrade all packages requiring admin priviledges at once
Description of the new feature / enhancement
I'd like to have the possibility to filter all packages that require admin priviledges and upgrade them in a single command. This way I could run an elevated command prompt and run the upgrade from there.
Background:
My company requires to use a different user for gaining admin rights. This way, the update process is very cumbersome requiring to enter username, password and second factor for every upgradable package that requires elevation.
Running winget upgrade --all
in an elevated command prompt (under the admin user) is not an option - then the packages with "local installation" would go to the admin user instead of my "default user".
Any thoughts on this or have I misunderstood something?
Side question: Is "package requires elevated rights" the same as package requires "system scope"? Can I inspect this for a given package? If yes I could do the filtering myself and write such an update script.
Proposed technical implementation details
Something like winget upgrade --all-system-scope
to upgrade all packages requiring elevated access at once.