Citrix session reconnection behavior during maintenance mode

Citrix session reconnection behavior during maintenance mode

Placing Citrix virtual apps and desktop resources into maintenance mode is a common task for all CVAD administrators.  However, maintenance mode has not always worked the way end users or administrators have wanted.  However, some recent changes have allowed Administrators to configure the behavior of sessions that were active prior to maintenance mode being enabled.

Originally, VDAs exhibited the following behaviors when placed in maintenance mode.

  • Server OS machines – users could connect to sessions that were already active but could not initiate new sessions.
  • Desktop OS & Remote PC machines – If the user is actively connected to the desktop session they remain connected until they disconnect or log off.  However, users that do not have active sessions are not able to connect or reconnect to desktop machines.

However in May, 2021 the change was made to allow Administrators to set this behavior for each Delivery Group via Microsoft PowerShell.

The default behavior matches the original design prior to May 2021 where reconnection in maintenance mode was disabled for single-session (Desktop OS) and allowed for multi-session (Server OS) machines.

The following commands can be utilized, via PowerShell to change this default behavior.

Note: these commands need to be run on the Citrix Delivery Controllers or from a machine that has the PowerShell snap-ins for Citrix installed.

When creating a new delivery group with the New-BrokerDesktopGroup command the –AllowReconnectInMaintenanceMode parameter can be used to set the desired behavior.

To change the behavior of an existing delivery group the Set-BrokerDesktopGroup command combined with the –AllowReconnectInMaintenanceMode parameter can be used to set the desired behavior for that delivery group.


Allow users to reconnect in maintenance mode while creating a new delivery group.

New-BrokerDesktopGroup "Assigned Desktops" -PublishedName "MyDesktop" -DesktopKind Private -AllowReconnectInMaintenanceMode $true

Prevent users from reconnecting in maintenance mode for an existing delivery group

Set-BrokerDesktopGroup "Assigned Desktops" -AllowReconnectInMaintenanceMode $false

Documentation on the above changes and PowerShell commands can be found at the following links.

Previous Maintenance Mode Behavior –

Maintenance Mode Change –

New-BrokerDesktopGroup –

Set-BrokerDesktopGroup –