Citrix Virtual Apps and Desktops service

Dynamic session timeouts

This feature lets you configure disconnected and idle session timeouts for your peak and off-peak usage times to achieve faster machine draining and cost savings. This feature applies only to multi-session OS machines. A multi-session VDA reports idle times for sessions that have been idle for more than 10 minutes, so dynamic session timeouts will not be able to disconnect idle sessions within 10 minutes of being idle. A lesser value removes lingering sessions sooner, thus reducing costs.

Autoscale multi-session OS - dynamic session timeout

Note:

Autoscale dynamic timeouts are for cost savings. If used for security purposes, the configured timeouts might conflict with your GPO or Manage console policies. When a conflict occurs, the shorter timeout prevails.

Idle session timeout. Enables or disables a timer that specifies how long an uninterrupted user connection is maintained if there is no user input. When the timer expires, the session is placed in the disconnected state and the Disconnected session timeout applies. If the Disconnected session timeout is disabled, the session is not logged off.

Important:

If you specify a value less than or equal to 10 minutes (600 seconds), Autoscale disconnects the relevant sessions after they have been idle for 10 minutes. This is because Autoscale relies on session idle times that multi-session VDAs report. Multi-session VDAs report idle times only for sessions that have been idle for more than 10 minutes.

Disconnected session timeout. Enables or disables a timer that specifies how long a disconnected desktop remains locked before the session is logged off. If enabled, the disconnected session is logged off when the timer expires.

Broker PowerShell SDK commands

The following Broker PowerShell SDK cmdlets were extended to provide configuration support for dynamic session timeouts.

  • *-BrokerDesktopGroup

The *-BrokerDesktopGroup PowerShell SDK cmdlets have been extended by adding the following new parameters:

  • DisconnectPeakIdleSessionAfterSeconds – Represents the time in seconds after which an idle session is disconnected during peak time. This property has a default value of 0, which indicates the disablement of its associated behavior during peak time. A value greater than 0 enables its behavior for the delivery group during peak time only.

  • DisconnectOffPeakIdleSessionAfterSeconds - Represents the time in seconds after which an idle session is disconnected during off-peak hours. The default value of this property is 0, which indicates the disablement of its associated behavior during off-peak. A value greater than 0 enables its associated behavior for the delivery group during off-peak hours only.

  • LogoffPeakDisconnectedSessionAfterSeconds - Represents the time in seconds after which a disconnected session is terminated during peak time. The default value of this property is 0, which indicates the disablement of its associated behavior during peak time. A value greater than 0 enables its associated behavior for the delivery group during peak time only.

  • LogoffOffPeakDisconnectedSessionAfterSeconds - Represents the time in seconds after which a disconnected session is terminated during off-peak hours. The default value of this property is 0, which indicates the disablement of its associated behavior during off-peak. A value greater than 0 enables its associated behavior for the delivery group during off-peak hours only.

This SDK extension affects only the following *-BrokerDesktopGroup cmdlets:

  • Get-BrokerDesktopGroup
  • New-BrokerDesktopGroup
  • Set-BrokerDesktopGroup

Suppose you want to set the idle session timeout to 3,600 seconds during peak times for a delivery group whose name is “MyDesktop.” Use the Set-BrokerDesktopGroup PowerShell command. For example:

  • C:\PS> Set-BrokerDesktopGroup "MyDesktop" -DisconnectOffPeakIdleSessionAfterSeconds 3600

Doing that disconnects sessions that have been idle for more than 1 hour in off-peak for the desktop group whose name is “MyDesktop.”

Dynamic session timeouts