How to Terminate Remote Desktop Session when Active or Idle Time Limits are Reached


   Information
This will allow you to enable to terminate (that is, the user is logged off and the session is deleted from the server) a Remote Desktop session after time limits set by you for active or idle sessions are reached.

By default, Remote Desktop Services disconnects instead of terminates sessions that reach their time limits.

You must be logged in as an administrator to be able to do this tutorial.

   Warning
While all editions of Vista, Windows 7, and Windows 8 can be a remote desktop client...
  • Only the Vista Business, Ultimate, and Enterprise editions can host a remote desktop connection.
  • Only the Windows 7 Professional, Ultimate, and Enterprise editions can host a remote desktop connection.
  • Only the Windows 8 Pro and Enterprise editions can host a remote desktop connection.





OPTION ONE

Using a REG File Download


1. To Disconnect Remote Desktop Sessions when Time Limits are Reached
NOTE: This is the default setting. If the status is set to Not Configured, Remote Desktop Services disconnects a timed-out session, unless specified otherwise in local settings.
A) Click on the Download button below to download the file below.
Disconnect_Timed_Out_Remote_Desktop_Sessions_Unless_Specified_Otherwise.reg
B) Go to step 4.
2. To Always Disconnect Remote Desktop Sessions when Time Limits are Reached
NOTE: If the status is set to Disabled, Remote Desktop Services always disconnects a timed-out session, even if specified otherwise by the server administrator.
A) Click on the Download button below to download the file below.
Always_Disconnect_Timed_Out_Remote_Desktop_Sessions.reg
B) Go to step 4.
3. To Terminate Remote Desktop Sessions when Time Limits are Reached
NOTE: If the status is set to Enabled, Remote Desktop Services terminates (that is, the user is logged off and the session is deleted from the server) any session that reaches its time-out limit.
A) Click on the Download button below to download the file below.
Terminate_Timed_Out_Remote_Desktop_Sessions.reg


Download

4. Save the .reg file to your desktop.

5. Right click on the downloaded .reg file and click on Merge.

6. Click on Run, Yes (Windows 7/8) or Continue (Vista), Yes, and OK when prompted.

7. Log off and log on, or restart the computer to apply.

8. When done, you can delete the downloaded .reg file if you like.



OPTION TWO

Through the Local Group Policy Editor


1. Open the all users, specific users or groups, or all users except administrators Local Group Policy Editor for how you want this policy applied.

2. In the left pane, click on to expand User Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, and Session Time Limits. (see screenshot below)
Remote Desktop - Terminate Session when Time Limits are Reached-gpedit-1_terminate.jpg
3. In the right pane, right click on Terminate session when time limits are reached and click on Edit. (see screenshot above)

4. To Disconnect Remote Desktop Sessions when Time Limits are Reached
A) Select (dot) Not Configured. (see screenshot below step 7)
NOTE: This is the default setting. If the status is set to Not Configured, Remote Desktop Services disconnects a timed-out session, unless specified otherwise in local settings.
B) Go to step 7.
5. To Always Disconnect Remote Desktop Sessions when Time Limits are Reached
A) Select (dot) Disabled. (see screenshot below step 7)
NOTE: If the status is set to Disabled, Remote Desktop Services always disconnects a timed-out session, even if specified otherwise by the server administrator.
B) Go to step 7.
6. To Terminate Remote Desktop Sessions when Time Limits are Reached
A) Select (dot) Enabled. (see screenshot below step 7)
NOTE: If the status is set to Enabled, Remote Desktop Services terminates (that is, the user is logged off and the session is deleted from the server) any session that reaches its time-out limit.
7. Click on OK. (see screenshot below)
Remote Desktop - Terminate Session when Time Limits are Reached-gpedit-2_terminate.jpg
8. Close the Local Group Policy Editor window.
That's it,
Shawn