How to View/Disconnect Remote Desktop Sessions from Command

** Myself with web

How to View/Disconnect Remote Desktop Sessions from Command

Sol1)

I used to receive the maximum number of connections error message when I try to log on to the Windows 2003 Server in my office via Windows Remote Desktop.
The terminal server has exceeded the maximum number of allowed connections
clip_image001
This is pretty annoying if you have some urgent work to do in the server. Most of the already logged in users won’t even be using the session at the time, but I can’t login! So how to solve this? After a bit of googling, as usual, I found a simple way to disconnect other remotely logged in sessions. clip_image002

Pre-Step

Access server by start->run-> authen shared file (Case not logon domain controller)
















































View
First of all you must be logged in to your client computer as a domain Admin user. Now open the command prompt and type in the following command.
qwinsta /server:SERVERIP
The Ip address or domain name of the Remote server should be entered in place of SERVERIP
Example:
qwinsta /server:10.10.1.10
You will get a list of the Remote Sessions in the command window.
clip_image009

Kill session
In the above sceenshot we can clearly see an Active RDP session with the ID 2 which belongs to the user Administrator. In order to disconnect that user we are going to use the session ID. Use the following command line to disconnect the remote session.
rwinsta /server:SERVERIP SESSIONID
For example in order to terminate the session of the Administrator user the following command should be given.
rwinsta /server:10.10.1.10 2
clip_image010
Now let’s confirm if the user is really disconnected. Just type in the qwinsta command in proper format.
clip_image011
As you can see our session with ID 2 is no longer there. Now for the user we just disconnected will see the following message.
clip_image012
The remote session was disconnected because you session was logged off at the remote computer. Your administrator or another user might have ended your connection.

0 comments:

Loading