How to Terminate Remote Desktop Sessions


Overview

I’ve worked in several companies where I’ve had to share the default 2 simultaneous remote desktop sessions on a single server. This isn’t a big deal if you only have 2 developers or other developers really don’t remote into the servers that much. However, what if you have a group of developers who all regularly access the server, or your coworkers always seem to click the “X” in the top-right corner instead of logging off? Well then you wind up with these connections constantly tied up. Usually the number of available connections is inversely proportional to the criticality of the needed connection.

So what do you do if you really need to get into the server? Here’s how to kick them or at least view who’s connected and what they’re doing.

Steps

  1. Remote Desktop into another server (or logon locally to another server if you have one).
  2. Navigate to the Administrative Tools menu from either Start Menu or Control Panel.
    1. Location varies by Windows Server version and configuration.
  3. Open the Terminal Services menu that’s inside the Administrative Tools menu.
  4. Open the Terminal Services Manager item (MMC plugin).
    1. You can also run “tsadmin.msc” if you can’t find this menu item.
  5. Click on the Action menu and select Connect to Computer.
  6. Select the Another computer radio button.
  7. Type in the computer name of the server you want to recover a remote desktop session on, or browse for it and then click OK.
  8. Select the server name from the list in the left pane.
  9. You should now see all of the sessions in the center content pane.
  10. From here you have some options.
    1. You can terminate the session by right-clicking on the session and selecting disconnect.
    2. You can reset the connection.
    3. You can log the user out, etc.
  11. Close the Terminal Services Manager.
  12. Log out of the server.

Note: Selecting Disconnect will recover the session but will terminate any running applications the user had open. For instance if they connect to the server, start an installation and then close the remote session but don’t log out (so the install stays running), it’ll kill this installation. However, if you know the person isn’t using the session and they simply closed out the session instead of logging out, you can recover this available connection by disconnecting them.

I hope this helps!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s