Retrieving Static Groups

Retrieves the specified Static Group object(s).


Examples:


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


Retrieve the Static Group "WinZip 12" from the Domain "solys.local":


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


Retrieve all Static Groups from the whole organization:


Get-EmdbGroup "emdb:\*" -SchemaTag "Group" -Recurse


Retrieve all Static Groups having their names starting with the substring "S" from "Chicago" and subordinated Organizational Units:


Get-EmdbGroup "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago\S*" -SchemaTag "Group" -Recurse


Retrieve the Static Group "SAP GUI 7.10" from the current context:


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

Get-EmdbGroup "SAP GUI 7.10" -SchemaTag "Group"


Retrieve the Static Group "Paint.NET 4" in the current context through its Item-ID (this ID will vary in different DSM environments):


Get-EmdbGroup -ItemID 8336 -Recurse


Tip: the alias ID can be used instead of ItemID.


Retrieve the Static Group "SAP GUI 7.10" from the current context using the cmdlet Get-Item:


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

Get-Item "SAP GUI 7.10"


Retrieve all Static Groups having their names starting with the substring "S" from "Chicago" and subordinated Organizational Units using the cmdlet Get-Childitem:


Get-ChildItem "emdb:\rootDSE\Managed Users & Computers\solys.local\Chicago" -Filter "&(Name=S*)(SchemaTag=Group)" -Recurse


Starting with PSX 3.1 there was a new option implemented when retrieving Group objects. When specifying the SingleItemExpected-switch it is expected, that none or exactly one object is contained in the result. If the retrieval returns more than one object, an error is raised that can be caught and handled in scripts.