Monday, November 23, 2015

PowerShell script to list all members of an Active Directory group.

Here's a script to finds all members that belong to a specific group within Active Directory. This example will be the Domain Admins Group.

PS >Get-ADGroupMember -identity "Domain Admins" -Recursive | Get-ADUser -Property DisplayName | Select Name,SAMAccountName,DisplayName

No comments:

Post a Comment