Saturday, March 27, 2010

Managing Terminal Services Sessions Remotely

Normally windows has a limitation of maximum 2 user session in terminal service administration mode

Many times you might have faced problem in connecting to Terminal Services because both sessions are used up. I can use another server to check the status of the first one. As long as the logged in user has administrative rights on the non-accessible machine I would run this:

qwinsta /server:10.196.10.2

Where, 10.196.10.2 is the IP address or name of the non-accessible machine.

This will display something like this:

qwinsta /server:10.196.10.2

SESSIONNAME USERNAME ID STATE TYPE DEVICE

console 0 conn wdconn

rdp-tcp 65536 Listen rdpwd

rdp-tcp#470 Steve 1 Active rdpwd

rdp-tcp#471 Rajesh 3 Active rdpwd

Now I know that Steve and Rajesh are the two that are logged in. Since I know that Rajesh has left the office sometimes ago and might have forgotten to log off, I have decided to terminate his session.

To disconnect Rajesh's session I would type this:

rwinsta /server:10.196.10.2 3

Notice the 3 which is the session ID I found from using qwinsta above.

There is another command, “query “which can serve the same purpose , but i prefer using qwinsta (Query Windows Station) and rwinsta (Reset Windows Station) as they are fully compatible with W2K ,WinXP , W2K3 and win2k8

No comments:

Post a Comment