HPD arrow Techlife Blog
Mar 9
Tuesday
English Arabic Bulgarian Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch Finnish French German Greek Hindi Italian Japanese Korean Norwegian Polish Portuguese Romanian Russian Spanish Swedish Catalan Filipino Hebrew Indonesian Latvian Lithuanian Serbian Slovak Slovenian Ukrainian Vietnamese Albanian Estonian Galician Hungarian Maltese Thai Turkish

Contact:

techlife at a glance

techlife sidesrelated linkstechlife interestsIT supportthe techlife it vault

How to get RDP access again with multiple

sessions on a machine

You may run into this scenario from time to time:

I am unable to RDP or TS into a server remotely because 2 people are logged in and the console port is in use.

Let’s just say that the people or person occuping the maximum number of allowed connections(including console) is new and doesn’t realize that they need to actually disconnect the session and not just click the ‘x’.  So you are an admin too but you can’t RDP in.  Here is an alternative method:

1.  Locate a machine that is running the same OS.  In this case it was WIN2K3.  You can obtain a remote prompt on that machine by using psexec.exe from:

http://live.sysinternals.com

Then you will want to query the terminal server of the machine you are not able to RDP into.  (Discussed later) 

2.  Copy the binary by clicking into it and saving locally to a place where you can find and execute it easily from the command line. 

3.  Press Windows key and R and then type in cmd and press enter. 

4.  CD to the directory you saved the psexec.exe binary and run the following command:

psexec -u domain\admin_creds \\servername cmd

*Note you can always verify you have a remote command line prompt by checking the hostname as follows:

hostname

Press enter and it will produce the system’s hostname

5.  Press enter and type in the password of the user with the admin creds and press enter. 

6.  Then do a query of terminal sessions by doing the following:

query session /server:servername

7.  Look for the sessions to pop up and find the desireable one to end.

8.  End it by typing in the following:

reset session [ID] /server:servername

9.  You can re-run that query again to determine that the session has been disconnected. 

10.  Exit out of that prompt by typing exit and then pressing enter.

11.  Launch an RDP session ie.

mstsc /v:servername

Cool

A connection. 

HPD arrow Techlife Blog