Skip to content

Set-CitrixMachine

Citrix: Updates a machine

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

	[Parameter(Mandatory = $true)]
	[bool]$InMaintenanceMode
)

try {
	Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
	Set-BrokerMachine -MachineName $MachineName -InMaintenanceMode $InMaintenanceMode -ErrorAction Stop
	Write-Output "Successfully updated maintenance mode for machine '$MachineName'."
} catch {
	Write-Error $_
	exit 1
}

The name of the machine.

Whether the machine should be in maintenance mode.

An interactive directory of PowerShell scripts.