How often have you run into the max-connection limit on your servers because you or other admins have left disconnected sessions logged in? Too often !

“The terminal server has exceeded the maximum number of allowed connections”

Terminal Server Warning

Terminal Server Woes

Terminal services allows up to 2 simultaneous connections for administrative purposes; but counts disconnected / inactive sessions towards this limit. Forgetting to log off; can essentially lock you and other admins out. Luckily session zero (console) doesn’t count towards this limit.

While connecting directly to the console often alleviates this problem, what happens when someone has commited the sin of leaving a session connected to the console (session 0).  Keyboard, Mouse and LCD?

Here’s a little work around I came across on the technobuff blog;

  • Open a command prompt and run the following;

query session /server:SERVERNAME
  • Record the ID of the session you want to terminate and run the following command

reset session [ID] /server:SERVERNAME