Wednesday, April 15, 2015

When too many is too much



benny smiling
My Boy Benny
So I was connected via RDP to a virtual dev server, when I unplugged my networking cable to connect it to a laptop.  This killed my RDP session.

I go to log back in and get the dreaded error that the terminal sever has exceeded the maximum number of allowed connections.

Now I was stuck. I had to have access to the server, and didn't feel like calling our server team to have them reset the connection.

A moment of Googling found the answer!



Doing a
query session /server:[server name or ip]
will display a list of connections to a server

C:\>query session /server:someserver
 SESSIONNAME      USERNAME      ID       STATE   TYPE        DEVICE
 console                         0       Conn    wdcon
 rdp-tcp                     65536       Listen  rdpwd
 rdp-tcp#8        Andrew         1       Active  rdpwd

Find the ID of the connection you need to terminate, and issue the following command.

C:\>reset session 1 /server:someserver

Viola, you're back in business.

Thanks to the HowToGeek for the info!
http://www.howtogeek.com/howto/windows/command-line-hack-for-terminal-server-has-exceeded-the-maximum-number-of-allowed-connections/

No comments: