Skip to content

Instantly share code, notes, and snippets.

@BanterBoy
Created July 27, 2018 14:49
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 BanterBoy/90a26a23c395170df640b989b4c2493d to your computer and use it in GitHub Desktop.
Save BanterBoy/90a26a23c395170df640b989b4c2493d to your computer and use it in GitHub Desktop.
Find Domain Admins
Get-ADGroupMember -Identity Administrators -Recursive |
ForEach-Object { get-aduser $_} |
Select-Object SamAccountName, GivenName, Surname, objectclass, name, enabled |
Sort-Object SamAccountName |
Format-Table -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment