Skip to content

Instantly share code, notes, and snippets.

@signalwarrant
Created March 9, 2021 16:21
Show Gist options
  • Save signalwarrant/3ded23229450d34181cdebc36b24a5b4 to your computer and use it in GitHub Desktop.
Save signalwarrant/3ded23229450d34181cdebc36b24a5b4 to your computer and use it in GitHub Desktop.
Get-DomainAdmins.ps1
# Run this once to get the Domain Admins group baseline
Get-ADGroupMember -Server signalwarrant.local -Identity "Domain Admins" |
Select-Object -ExpandProperty samaccountname |
Export-Clixml -Path 'C:\scripts\CurrentDomainAdmins.xml'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment