Last active
September 14, 2020 14:57
-
-
Save msoxzw/604aef09e82397e31f023b6ea605f619 to your computer and use it in GitHub Desktop.
One command line run as self-elevated administrator
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
@whoami /groups | find "S-1-16-8192" && (echo Start-Process cmd '/c ""%~f0" %*"' -Verb RunAs | PowerShell - & exit /b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Support command line argument as well, which is unavailable in the system "run as administrator"