How to kill RDP sessions remotely


Problem: How to reset/kill Remote Desktop Connection(RDP) remotely

Yyou probably have ran into message “The terminal server has exceeded the maximum number of allowed connections”. Fortunately, there is way to reset RDP connection remotely from command prompt. In command prompt, execute following commands to kill terminal services sessions remotely.

Step 1. Gain enough privilege to kill RDP connection on the server. net use \\servername_or_IP /USER:username “password“, if not in same domain or if your user does not have enough permissions.

Step2. List the connection to a particular server and get session ID. query session /server:servername

Step3. Reset the session which you don’t need using ID of the session from Step 2.

reset session ID /server:servername_or_IP That’s it!

Hope this information can save you some time.

Advertisements

About rodvars
Been working in IT Services/Consulting for the past 15 years. My main areas of work are planning, development, managing and administration System infrastructures focusing on optimizing user processes, enforcing business security, performance enhancements, high availabilty and infrastucture scalability.

One Response to How to kill RDP sessions remotely

  1. kane says:

    It helps a lot and thank you very much.

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

%d bloggers like this: