-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Active Directory with PowerShell
By :
So far we saw the addition of various Active Directory objects (users, computers, and groups) to security groups, but how do we know that they are actually added? How do we find out the current members of a given security group?
These questions can be simply answered with the Get-ADGroupMember cmdlet in Active Directory. As the name of the cmdlet indicates, it queries the members of a given group. For example, let's see the membership of one of the groups that we updated in the previous example, by using the following command:
Get-ADGroupMember -Identity ParentGroup1 | Measure-Object Get-ADGroupMember -Identity ParentGroup1 | select Name
Refer to the following screenshot of the preceding command for more clarity:

The Measure-Object cmdlet shows how many objects are returned from the Get-ADGroupMember cmdlet when queried for the members of ParentGroup1. Remember that this is the same group where we added several child groups in the...
Change the font size
Change margin width
Change background colour