Skip to content

Instantly share code, notes, and snippets.

@gnaggnoyil
Forked from liyafe1997/sudo.ps1
Created March 7, 2020 12:48
Show Gist options
  • Save gnaggnoyil/96e073a3b20e978bf71a8e79b5ab8af3 to your computer and use it in GitHub Desktop.
Save gnaggnoyil/96e073a3b20e978bf71a8e79b5ab8af3 to your computer and use it in GitHub Desktop.
sudo.ps1, sudo for PowerShell, put in C:\Windows then you can sudo in powershell lol. You need sudo.bat(https://gist.github.com/liyafe1997/e036a7c3d4fb3903d567ec6d62c324ef)
If($args){sudo.bat powershell -NoExit -Command "(cd "$pwd");("$args")"}Else{sudo.bat powershell -NoExit -Command "cd "$pwd}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment