We have servers on which we run tests and all users connect using the same credentials. The server allows 2 connections. What happens often is that one user is already active and the other two users keep hijacking the remaining session.

Using query session, I can find out what are the active connections. But it does not list the client machine from where the session originates, which taskmanager displays.

How do I get this information from a remote machine? I prefer a command line solution. Thanks in advance.

link|improve this question
feedback

2 Answers

netstat -n | find "3389"

also keep in mind that session may be disconnected and so have to disable disconnected session or set it on timeout

link|improve this answer
I am trying to find from a remote machine where the current sessions are connecting from. But if all else fails I can probably run this using psexec. – Hemal Pandya Jun 15 '10 at 10:45
1  
you also can make shared (r/o) folder and scheduled script like >netstat -n | find "3389" > c:\Folder\Report.txt and run this script every minute :) so any who has access to c:\Folder\Report.txt can see active sessions :) – evg345 Jun 16 '10 at 5:21
You definitely can run this using psexec, or use evg345's suggestion of a scheduled task. Either way, this is a very workable solution and I think it's worth accepting. – Miles Erickson Jul 28 '10 at 0:26
feedback

Well the simple answer is don't share credentials to cheat at terminal server licencing.

link|improve this answer
Thanks, EK. Unfortunately that is not an option. And let me assure you this has nothing to do with licensing :) – Hemal Pandya Jun 15 '10 at 10:46
Sharing credentials does not defeat licensing restrictions. – John Gardeniers Jun 15 '10 at 11:09
Thanks John, I don't know whether it does. I was only mildly concerned at EK's insinuation of illegal activity :) – Hemal Pandya Jun 15 '10 at 11:16
no, I didn't mean that. It was more of insinuating that it might be the wrong tool for the job. :) People shy away from terminal server thinking that either it will be expensive or a big overhead – JamesRyan Jun 18 '10 at 13:58
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.