Created
January 5, 2018 09:24
-
-
Save chaosddp/81f9fb4b5301c0f1df23ef54f39775ca to your computer and use it in GitHub Desktop.
Check if running as Admin
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
([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment