February 6th, 2013

PowerTip: Use a PowerShell Cmdlet to Find Group Membership

Doctor Scripto
Scripter

Summary: Learn how to use a Windows PowerShell cmdlet to find group membership.

Hey, Scripting Guy! Question I want to use Windows PowerShell to find all members of a particular group in Active Directory. I would like to do this even if the membership is through other groups (indirect). What can I do?

Hey, Scripting Guy! Answer Use the Get-ADGroupMember cmdlet from the ActiveDirectory module with the –Recursive parameter. The following illustrates this technique.

Get-ADGroupMember -Identity ‘Domain Admins’ -Recursive

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback