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