Disconnect Terminal Service Sessions Remotely

No doubt you’ve spent some time managing your servers remotely via Windows Terminal Services, and have run into this error:

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

In all likelihood, someone probably just forgot to disconnect their session, but now that you can’t get in there, how do you log them out? One option is to log into a different system, then open Control Panel: Administrative Tools: Terminal Services Manager. Next, open Actions: Connect to Another Computer, and you’ll see the active connections for that system. You can then bump off the disconnected sessions by right-clicking them.

Two other options:

  1. Use the command-line
  2. Log in as the console user with a command like this, which will open a session that’s very similar to what you’d see as if you were standing in front of the machine. Anyone else logged in as console will be booted out.
  3. mstsc /v:serverName /console

Tags: ,

Leave a Reply