Active Directory:- Get Group Members using Powershell ( Get-ADGroupMember )

Background

I need to query Active Directory ( AD ) and get a listing of group members matching a specific criteria.

GUI

Active Directory Users and Computers

Active Directory Users and Computers MMC is a very capable tool for querying AD.

Console

Powershell – Active Directory

Get-ADGroupMember

Here is how I will do so using Microsoft’s Powershell.

Syntax

powershell -Command "Get-ADGroupMember -Identity <group-name> "

Sample
Search the AD Group Legal and Return all group members named Jude

powershell -Command "Get-ADGroupMember -Identity Legal  | where-Object {$_.name -like '*Jude*'} | select name, distinguishedName "

References

  1. Microsoft
    • Learn / Windows / PowerShell / ActiveDirectory
      • Get-ADGroupMember
        Link

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s