Remote Desktop - Set Time Limit for Active Sessions

How to Set Time Limit for Active Remote Desktop Sessions

   Information
This allows you to specify the maximum amount of time that a Remote Desktop Services session can be active before it is automatically disconnected.

If a time limit is set, the user receives a warning two minutes before the Remote Desktop Services session disconnects, which allows the user to save open files and close programs.

If you have a console session, active session time limits do not apply.

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

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) GPEDIT-1.jpg
3. In the right pane, right click on Set time limit for active Remote Desktop Services sessions and click on Edit. (see screenshot above)

4. To Remove Time Limit for Active Remote Desktop Services Sessions A) Select (dot) either Not Configured or Disabled. (see screenshot below step 6)
NOTE: Not Configured is the default setting.

B) Go to step 6.
5. To Set Time Limit for Active Remote Desktop Services Sessions A) Select (dot) Enabled. (see screenshot below step 6)

B) Under Options, click on the Active session limit drop down box and select an amount of time you would like to set as the time limit. (see screenshot below step 6)
6. Click on OK. (see screenshot below) GPEDIT-2.jpg
7. Close the Local Group Policy Editor window.



OPTION TWO

Manually in Registry Editor

1. Open the Start Menu, then type regedit in the search box and press Enter.

2. If prompted by UAC, then click on Yes.

3. In regedit, navigate to the location below: (see screenshot below)
Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
Reg1.jpg
4. To Set Time Limit for Active Remote Desktop Services Sessions A) In the right pane of Terminal Services, right click on a empty space, click on New and DWORD (32-bit) Value, type MaxConnectionTime and press Enter. (see screenshot below) Reg2.jpg
B) In the right pane, right click MaxConnectionTime and click on Modify. (see screenshot above)
C) Select (dot) Decimal, then type in the registry Value data in the table below for the amount of time you want to set as the time limit and click on OK. (see screenshot below) Reg4.jpg

Time Limit | Registry Value data
Never| 0 (number zero)
1 minute| 60000
5 minutes| 300000
10 minutes| 600000
15 minutes| 900000
30 minutes| 1800000
1 hour| 3600000
2 hours| 7200000
3 hours| 10800000
6 hours| 21600000
8 hours| 28000000
12 hours| 43200000
16 hours| 57600000
18 hours| 64800000
1 day| 86400000
2 days| 172800000
3 days| 259200000
4 days| 345600000
5 days| 432000000
D) Go to step 6.
5. To Remove Time Limit for Active Remote Desktop Services Sessions A) In the right pane, right click MaxConnectionTime and click on Delete. (see screenshot below step 4A)

B) Click on Yes. (see screenshot below) Delete.jpg
6. Close regedit.

7. Log off and log on, or restart the computer to apply the changes.
That's it,
Shawn




 
Last edited:
10 minutes should read 600000 not 60000
15 minutes should read 900000 not 90000
 

My Computer

Computer type
PC/Desktop
OS
Windows 7
Thank you Richard. Corrected. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top