Add-CitrixMachine
Citrix: Adds a machine to a catalog
param(
[Parameter(Mandatory = $true)]
[string]$MachineName,
[Parameter(Mandatory = $true)]
[string]$CatalogName
)
try {
if (-not (Get-Module -ListAvailable Citrix.Broker.Admin.V2)) {
throw "Citrix Broker PowerShell module not found."
}
Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
New-BrokerMachine -MachineName $MachineName -DesktopGroup $CatalogName -ErrorAction Stop
Write-Output "Successfully added machine '$MachineName' to catalog '$CatalogName'."
}
catch {
Write-Error $_
exit 1
}The name of the machine to add (e.g. DOMAIN\Machine$).
The name of the machine catalog.