Joseph Michael Pesch
VP Programming

Remote Desktop Connections

by 11. August 2008 16:57

Connecting remotely using %SystemRoot%\System32\mstsc.exe (run with /? for list of command line parameters).

When attempting to connect via RDC, the server will typically only support a fixed number of active connections (in my experience with various Windows servers it is typically 2).  This means that only two different users can be connected at the same time.  Also, when users don’t log off properly (i.e. by closing the client window vs. actually logging off) their session stays connected even though they no longer have a client window open to it.  This is usefull if you want to leave a process running, leave windows open, etc., close your client window and re-connect later to pick up where you left off.  However, the downside is that you will be blocking one of the available connections thus preventing other new sessions.  Should the machine become inaccessible due to too many active connections you have four basic options of recovery (shown below).

  1. Launch "All Programs" > "Administrative Tools" > “Terminal Services Manager” and then expand the "All Listed Servers" treeview on the left pane.  You should see your domain name there, double-click to load list of all available machines.  Find the machine in question and click on it to view the active connections in the right pane.  You can right-click on any of the connections in the right pane and perform several actions such as ("Send Message", "Disconnect","Reset", etc.).  Typically, you will select "Reset" on the connections that are inactive.
  2. mstsc /console” command. This will launch the same Remote Desktop Client you use every day; however, it will connect you in Console Mode. Console Mode means connecting to the server as if you were actually on the server using the server’s keyboard and mouse.  Only one person can be connected in console mode at a time.  Once you get on the machine in Console Mode you can launch “Terminal Service Manager” to view the disconnected sessions and reset them to reclaim the connections as described in option 1 above.
  3. qwinsta /SERVER:servername” command. This display the connections on the machine in question.  You can then run "rwinsta {sessionname | sessionid} /SERVER:servername" command to reset the desired connection.
  4. Method of last resort, get on the physical machine and perform option 1 above.  This is the same as option 1 and 2 other than you need to get on the physical machine. 



Comments are closed