News for hackers. Stuff that matters.
Re:Sudo for Windows by westurner on Thursday February 08, 2024 @11:19PM (#39311338)
Is there anything shorter than `powershell.exe -executionpolicy unrestricted -file`?

  powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages
setup_windows.ps1: https://github.com/westurner/dotfiles/blob/develop/scripts/s...
Re:Sudo for Windows by jve on Friday February 09, 2024 @02:22AM (#39312327)
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)
Re:Sudo for Windows by westurner on Saturday February 10, 2024 @09:00AM (#39326158)
Thx