Group-CitrixMachine
Citrix: Groups machines
param(
[Parameter(Mandatory = $true)]
[string[]]$MachineName,
[Parameter(Mandatory = $true)]
[string]$DesktopGroupName
)
try {
Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
foreach ($m in $MachineName) {
Set-BrokerMachine -MachineName $m -DesktopGroup $DesktopGroupName -ErrorAction Stop
}
Write-Output "Successfully grouped machines to '$DesktopGroupName'."
} catch {
Write-Error $_
exit 1
}The name(s) of the machine(s).
The name of the desktop group.