Skip to content

Instantly share code, notes, and snippets.

@atao
Created November 29, 2016 14:44
Show Gist options
  • Save atao/a95a5ecbf4d9812bb73ae3250565dcbd to your computer and use it in GitHub Desktop.
Save atao/a95a5ecbf4d9812bb73ae3250565dcbd to your computer and use it in GitHub Desktop.
PowerShell is running with administrator rights?
#RunInAdmin?
([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