Stop-CitrixSession
Citrix: Stops a Citrix session
param(
[Parameter(Mandatory = $true)]
[int]$SessionId
)
try {
Import-Module Citrix.Broker.Admin.V2 -ErrorAction Stop
Stop-BrokerSession -SessionId $SessionId -ErrorAction Stop
Write-Output "Successfully stopped session '$SessionId'."
} catch {
Write-Error $_
exit 1
}The unique ID of the session to stop.