Skip to content

Move-CitrixMachine

Citrix: Moves a machine

param(
	[Parameter(Mandatory = $true)]
	[string]$MachineName,

	[Parameter(Mandatory = $true)]
	[string]$DestinationGroupName
)

try {
	Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
	Set-BrokerMachine -MachineName $MachineName -DesktopGroup $DestinationGroupName -ErrorAction Stop
	Write-Output "Successfully moved machine '$MachineName' to '$DestinationGroupName'."
} catch {
	Write-Error $_
	exit 1
}

The name of the machine.

The name of the target desktop group.

An interactive directory of PowerShell scripts.