Retrieving Citrix Farm Objects

Retrieves the specified Citrix Farm object(s).


Examples:


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


Retrieve the Citrix Farm object "XA65Farm" from the container "Managed Users & Computers\solys.local\Citrix\XenApp":


Get-EmdbCitrixFarm "emdb:\rootDSE\Managed Users & Computers\solys.local\Citrix\XenApp\XA65Farm"


Retrieve all Citrix Farm objects from the container "Managed Users & Computers\solys.local" and its subcontainers:


Get-EmdbCitrixFarm "emdb:\rootDSE\Managed Users & Computers\solys.local\*" -Recurse


Retrieve the Citrix Farm object "XenApp 7.6" in the current context through its Item-ID (this ID will vary in different DSM environments):


Get-EmdbCitrixFarm -ItemID 7505 -Recurse


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


Retrieve the Citrix Farm "XA65Farm" from the current context using the cmdlet Get-Item:


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

Get-Item "XA65Farm"


Retrieve all Citrix Farm objects from the container "Managed Users & Computers\solys.local" and its subcontainers using the cmdlet Get-ChildItem:


Get-ChildItem "emdb:\rootDSE\Managed Users & Computers" -Filter "SchemaTag=CitrixFarm" -Recurse


Starting with PSX 3.1 there was a new option implemented when retrieving Citrix Farm 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.