Just scrolling through the documentation [1] gives some idea. Examples in the end may surprise the reader with the variety of capabilities.
[1]: https://www.man7.org/linux/man-pages/man5/sudoers.5.html
Sudo is widely understood to refer to a program which allows specific users to run specific privileged commands.
Or does runas work differently than I thought?
(Also, if UAC settings are turned down, that might mean the UAC prompt isn't on the secure desktop, and any malware can thus trivially elevate itself if your everyday account is an admin... etc.)
But the base "sudo" case where you have an account that supports UAC elevation (you are your own administrator) runas definitely supports as the CLI way to invoke UAC prompts for your own account, not just other administrator accounts. (Using the /trustlevel flag accordingly, as I recall.)
https://learn.microsoft.com/en-us/windows/sudo/#how-is-sudo-...
If the elevation prompt would show the elevated executable and not the wrapper, that would be news...
powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages
setup_windows.ps1:
https://github.com/westurner/dotfiles/blob/develop/scripts/s... powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages
powershell -ex bypass -f ./setup_windows.ps1 -I -UpdateW -UpdateC
(or whatever are short enough to uniquely identify parameter names for your script)