Retrieving Members of Dynamic Groups

The members of a Static Group can be retrieved -similar to retriving members of Static Groups- by invoking the cmdlet Get-EmdbGroupMember or by invoking the method GetMembers() of the group object.

Examples:


Hint: The execution of these examples requires a connected PowerShell drive.


Retrieve the members of the Dynamic Group "WinZip 12" in the Domain "solys.local":


Get-EmdbGroupMember -Group "emdb:\rootDSE\Managed Users & Computers\solys.local\WinZip 12"


Alternatively retrieve the members of the Dynamic Group "WinZip 12" in the Domain "solys.local" by invoking the method GetMembers():


$MyGroup = Get-EmdbGroup "emdb:\rootDSE\Managed Users & Computers\solys.local\WinZip 12" -SchemaTag "Group"

$MyGroup.GetMembers()


Retrieve the members of the Dynamiic Group "Admins" in the current context:


Cd "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Benutzer"

Get-EmdbGroupMember -Group "Admins"


Alternatively retrieve the members of the Dynamic Group "Admins" in the current context by invoking the method GetMembers():


Cd "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\ITService\Benutzer"

$MyGroup = Get-EmdbGroup "Admins" -SchemaTag "Group"

$MyGroup.GetMembers()