Skip to content

Add-CitrixUser

Citrix: Adds a user to a desktop group

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

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

try {
	Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
	Add-BrokerUser -Name $UserName -DesktopGroup $DesktopGroupName -ErrorAction Stop
	Write-Output "Successfully added user '$UserName' to desktop group '$DesktopGroupName'."
} catch {
	Write-Error $_
	exit 1
}

The name of the user or group (e.g. DOMAIN\User).

The name of the desktop group.

An interactive directory of PowerShell scripts.