Created
July 27, 2018 14:49
-
-
Save BanterBoy/90a26a23c395170df640b989b4c2493d to your computer and use it in GitHub Desktop.
Find Domain Admins
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
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