Saturday, March 27, 2010
NET USE command
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
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.