How to Automatically Log Off Disconnected Remote Desktop / Terminal Services Sessions

I've frequently heard complaints about people forgetting to log off when they end a Remote Desktop session. Instead they simply close the window, leaving their session running on the server. This orphaned session becomes a problem in many cases because Windows Servers are typically only licensed for two simultaneous logged in users. Even worse, if you can't remote into the box, you may not be able to easily identify the culprit(s) who left their sessions active. This leaves you no-one to throw things at and generally a very grumpy person.

Fortunately there is a solution to this problem...

You can configure Terminal Services to terminate abandoned sessions fairly easily on Windows 2000 and 2003 servers by doing the following:

  1. On the server, go to "Start > Programs > Administrative Tools > teminal Services Configuration"
  2. Select "Connections", then right click on RDP-Tcp and select Properties
  3. Select the Sessions tab and Check the "Override user settings" checkbox.
  4. Choose the criteria under which you'd like to start killing off sessions.

That does it!

Comments (7)

Add Comment ]

Dan Roberts thanks, that is helpful. We seem to run into this every few months
Lee This is good info. I think this will help!
Felipe Thanks mate, I've been looking for this for months!
Pantera975 This wouldn't work for me.. not sure why. I made a batch file that does the trick.. just copy / paste it to Kill_Disconnects.bat and set it as a scheduled task

@echo off
Quser /server:XXXXXXXX > loggedon.txt
for /f "tokens=2" %%a in ('"FIND "Disc" loggedon.txt"') do set User=%%a
IF NOT %User%==LOGGEDON.TXT rwinsta /server:XXXXXXXX %User%
Tom Thanks! This is exactly what I needed.
tanks guyTHANKS It didn't work for me either, the program wouldn't save the session settings. But thanks a lot for the bat file, it's even better!
Azeem In Windows 2008 I found this
Admim Tools -->Remote Desktop Services --> Remote Desktop Session Host Configuration. Click on RDP-Tcp goto properties, choose Sessions tab and Override user settings.

Add Comment ]

Post a comment

Leave this field empty:


coldfusion misc user groups standards security technology flex sumo adobe max fitness coworkingatlanta commonspot version control travel svn robots that rock productivity music bluedragon air wireless vpn san diego railo jobs javascript webdirections scalability mysql fusionreactor fusebox etech cfobjective cfeclipse 1password