Remote Desktop connection via batch file won't disconnect after session
Posted on 2010-08-31
I run a scheduled task each night on my server (2003) box which opens an RDP session with another remote server (2003). The session opens a batch file on connection that loads several databases to the remote server. Usually once everything has been loaded up, the session ends and it disconnects automatically, but lately I will get to work in the morning and the RDP window will still be open. It will allow me to log back in, but I cannot see anything but a window with a blue background and I am forced to close it. This of course tells me that the session is still active and my programs will continue running until I log back in again. However it won't let me log back in because "I have exceeded the max number of terminal server connections" ... I have figured out that I can log in via console (mstc /console) but that isn't a solution.
Anybody have an idea why my session won't disconnect automatically anymore? The weird thing is if I run that same rdp session at work watching it, it seems to work.