Created
April 29, 2014 19:52
-
-
Save arebee/d5cdca802e0961b547c5 to your computer and use it in GitHub Desktop.
Powershell one-liner for UAC detection.
This file contains hidden or 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
# Will return false if you aren't in a UAC evelvated command prompt. true if you are. | |
(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment