Last active
February 21, 2019 14:20
-
-
Save NateScarlet/8acfafcbcdd97603fea6794964d155d8 to your computer and use it in GitHub Desktop.
Sudo for windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CALL :SUDO %* | |
GOTO :EOF | |
:SUDO | |
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "Start-Process -Wait -FilePath powershell.exe -ArgumentList @('-NoProfile', '-InputFormat', 'None', '-ExecutionPolicy', 'Bypass', '-Command', 'cd', '%cd%', ';', """%*""") -verb RunAs" | |
GOTO :EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment