Summary: Use Windows PowerShell to find the members of critical groups.
How can I use Windows PowerShell to track who is a member of my Domain Admins group?
Use Get-ADGroupMember, and add as many groups as you want to the list by using the
SamAccountName for the groups:
“Schema Admins”, “Domain Admins”, “Enterprise Admins” |
foreach {
$grpname = $_
Get-ADGroupMember -Identity $_ |
select @{N=’Group’; E={$grpname}}, Name
}
0 comments