Re:Sudo for Windows
by westurner on Thursday February 08, 2024 @11:19PM
(#39311338)
Is there anything shorter than `powershell.exe -executionpolicy unrestricted -file`?
setup_windows.ps1:
https://github.com/westurner/dotfiles/blob/develop/scripts/s...
[ Parent
| on HN ]
The executionpolicy merely allows you to write unsigned scripts. Not that it runs them elevated.
Re:Sudo for Windows
by jodrellblank on Friday February 09, 2024 @10:03PM
(#39323164)
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)