Skip to content

Instantly share code, notes, and snippets.

@benpturner
Last active September 16, 2018 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benpturner/079bb17dde68e719ada28014162c7644 to your computer and use it in GitHub Desktop.
Save benpturner/079bb17dde68e719ada28014162c7644 to your computer and use it in GitHub Desktop.
Whoami /groups
([Security.Principal.WindowsIdentity]::GetCurrent());
$tl=@{Expression={((New-Object System.Security.Principal.SecurityIdentifier($_.Value)).Translate([System.Security.Principal.NTAccount])).Value};Label="Group Name";Width=400}; ([Security.Principal.WindowsIdentity]::GetCurrent()).Groups | FT $tl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment