The “Get-ADGroupMember” cmdlet is used to retrieve the group members of the Active Directory group in PowerShell. These members may include computers, groups, and users. The stated cmdlet uses the “-identity” parameter to get access to the active directory group. The values like security identifier, name, or Security Account Manager (SAM) are used to identify a group.
This post will provide the details about the “Get-ADGroupMember” cmdlet.
Get-ADGroupMember: Find AD Users Fast With PowerShell
The stated command “Get-ADGroupMember” in PowerShell is used to get the members of the Active Directory group.
Examples related to the stated command are provided below!
Example 1: Utilize the Cmdlet “Get-ADGroupMember” to Retrieve the Group Members
To retrieve the members of a group, use the following command:
After executing the above command the prompt will ask you to enter a value, then write the “Administrator” value to get all the members of the group.
Example 2: Use the “Get-ADGroupMember” Cmdlet to Get the List of All Administrator’s Group Members
To get the list of all the administrator’s group members, run the below-stated command:
In the above-stated code:
-
- First, specify the “Get-ADGroupMember” cmdlet.
- After that, specify the “-Identity” parameter and assign the value “Administrators” to it.
Example 3: Use the “Get-ADGroupMember” Cmdlet to Get the Members of the Group Including the Child Groups
Execute the provided command to get the members list of all the groups including the child groups:
According to the code above:
-
- First, specify the stated cmdlet.
- Then, write the “-Identity” parameter and assign the value “Enterprise Admins”.
- Lastly, add the “-Recursive” parameter.
That’s all! We have explained the process of finding AD users fast using the “Get-ADGroupMember” cmdlet in PowerShell.
Conclusion
The cmdlet “Get-ADGroupMember” retrieves the Active Directory group members in PowerShell. Moreover, the “-identity” parameters can be used to get access to the Active Directory group. This post covered the aspects of the stated cmdlet.