Creating Citrix Farm Objects

Creates a Citrix Farm object in the current or in the specified context.


Examples:


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


Create the Citrix Farm "XA65Farm" in the context "Managed Users & Computers\solys.local\Citrix\XenApp":


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


Create the Citrix Farm "XA75 Farm" in the current context:


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

New-EmdbCitrixFarm "XA75 Farm"


Create the Citrix Farm "MyFarm" in the context "Managed Users & Computers\solys.local\Citrix\XenApp" using the cmdlet New-Item:


New-Item -Path "emdb:\rootDSE\Managed Users & Computers\solys.local\Citrix\XenApp" -Name "MyFarm" -ItemType "CitrixFarm"


Create the Citrix Farm "MyNewFarm" in the current context using the cmdlet New-Item:


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

New-Item "MyNewFarm" -ItemType "CitrixFarm"


Hint:  In the context of the emdb drive, the cmdlet New-Item provides the additional parameter -DelayCreation. Using this parameter creates the object on the client side only and doesn't propagate the changes to the DSMDB instantly. Now you can manipulate properties of this object and finally the changes can be propagated to the DSMDB by calling the method Create().


Example:


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

$MyNewFarm = New-Item "XA75" -ItemType "CitrixFarm" -DelayCreation

$MyNewFarm.Description = "The brand new XenApp 7.5 Farm"

$MyNewFarm.Create()