Configure Timeout and Reconnection Settings for Terminal Services Sessions

Applies To: Windows Server 2008

By default, Terminal Services allows users to disconnect from a remote session without logging off and ending the session. When a session is in a disconnected state, running programs are kept active even though the user is no longer actively connected.

You can limit the amount of time that active, disconnected, and idle (without user input) sessions remain on the server. This is useful because sessions that remain running indefinitely on the terminal server continue to consume system resources.

Configuring timeout and reconnection settings on a per-connection basis affects all sessions that use the connection.

You can configure timeout and reconnection settings on a per-user basis by using the Terminal Services Extension to the Local Users and Groups snap-in or to the Active Directory Users and Computers snap-in.

Timeout and reconnection settings configured by using Terminal Services Configuration will take precedence over timeout and reconnection settings that have been configured for a specific user account.

You can configure the following timeout and reconnection settings in Terminal Services Configuration.

Setting Details

End a disconnected session

Specify the maximum amount of time that a disconnected user session is kept active on the terminal server. If you specify "Never," the user's disconnected session is maintained for an unlimited time.

When a session is in a disconnected state, running programs are kept active even though the user is no longer actively connected.

Active session limit

Specify the maximum amount of time that the user's Terminal Services session can be active before the session is automatically disconnected or ended.

The user receives a warning two minutes before the Terminal Services session is disconnected or ended, which allows the user to save open files and close programs.

Idle session limit

Specify the maximum amount of time that an active Terminal Services session can be idle (without user input) before the session is automatically disconnected or ended.

The user receives a warning two minutes before the session is disconnected or ended, which allows the user to press a key or move the mouse to keep the session active.

When a session limit is reached or connection is broken

Specify whether to disconnect or end the user's Terminal Services session when an active session limit or an idle session limit is reached.

If the user's session is disconnected, the programs that the user is running are kept active even though the user is no longer actively connected.

If the user's session is ended, the user will need to establish a new Terminal Services session with a terminal server.

Use the following procedure to specify the timeout and reconnection settings for a remote session.

Membership in the local Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (https://go.microsoft.com/fwlink/?LinkId=83477).

To specify timeout and reconnection settings for a remote session

  1. Open Terminal Services Configuration. To open Terminal Services Configuration, click Start, point to Administrative Tools, point to Terminal Services, and then click Terminal Services Configuration.

  2. Under Connections, right-click the name of the connection, and then click Properties.

  3. In the Properties dialog box for the connection, click the Sessions tab.

  4. Click OK. Changes to timeout and reconnection settings are not applied to sessions that are connected when the change is made. The changes will take effect the next time the user establishes a new connection to the terminal server.

You can also configure timeout and reconnection settings by applying the following Group Policy settings:

  • Set time limit for disconnected sessions

  • Set time limit for active but idle Terminal Services sessions

  • Set time limit for active Terminal Services sessions

  • Terminate session when time limits are reached

These Group Policy settings are located in the following locations:

  • Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Session Time Limits

  • User Configuration\Administrative Templates\Windows Components\Terminal Services\Terminal Server\Session Time Limits

These Group Policy settings can be configured by using either the Local Group Policy Editor or the Group Policy Management Console (GPMC). Note that these Group Policy settings will take precedence over the settings configured in Terminal Services Configuration. If both the Computer Configuration and the User Configuration policy settings are configured, the Computer Configuration policy settings take precedence.

For more information about Group Policy settings for Terminal Services, see the Terminal Services Technical Reference (https://go.microsoft.com/fwlink/?Linkid=89673).

For information about configuring timeout and reconnection settings on a per-user basis, see the topic "<UserAccount> Properties: Sessions Tab " in the Windows ServerĀ 2008 Terminal Services User Properties Help.

Additional references