2

Is there a quick way to find out which servers I'm currently remoted in to? I'm running Windows XP on my computer, and I've closed all my rdp windows but didn't log off, and I'd like to know if there is a way for me to find out all the servers that I'm currently rdp'ed to.

Thanks!

2
  • are they on domain? Jun 26, 2012 at 19:50
  • yes, they are on a domain.
    – Chinesinho
    Jun 26, 2012 at 20:03

5 Answers 5

4
netstat -an |find "3389"

This shows all open connections, and then filters to only show matches for 3389 (the normal RDP port). This shows the other endpoint (the server you're connected to). This will also show any machines that have 3389 connected to you, as well.

/Edit - I think this might not be the answer you're looking for? You want to know all machines that you're no longer connected to, but have a disconnected session open on? You'll have to query each machine - I hope you're in a domain.

So - get a list of all servers in your domain (and/or whatever machines might be in question.) Put it in a file called servers.txt. Run :

for /f %s in (servers.txt) do (echo %s & qwinsta /server:%s )

4
  • thanks for response, but yea...I'm looking for machines that I'm "no longer" connected to, but have a disconnected session open. I'll have to query each machine in the domain? Because I don't remember what machine(s) I'm connected to...that's why I think what I'm trying to do will come in quite handy.
    – Chinesinho
    Jun 26, 2012 at 20:07
  • actually that command will only show you current open rdp connections - not what machines you are logged into
    – Jim B
    Jun 26, 2012 at 20:14
  • 1
    @JimB - you'll see my edit shows that I figured that out from a re-reading of his question :-)
    – mfinni
    Jun 26, 2012 at 20:16
  • @mfinni ahh yes - amazing what refreshing the webpage will tell you.
    – Jim B
    Jun 26, 2012 at 20:18
2

the simplest way is to use Query user /server:servername This command will give you a list of sessions that the currently logged on user has on a given servername. This could be used in a batch or powershell script for automation.

1

http://code.google.com/p/cassia/ - in the package there is sessioninfo.exe, you can try this. Basically you can go thru all remote desktop servers, and list each session state, like connected (connection established), disconnected (connection closed). You can also redirect session to the console etc.

1
  • Ive used the cassia stuff before, it works well. A lot of it is replicated in the official RDS Powershell modules now though. Jun 26, 2012 at 22:41
1

Assuming you have the appropriate user rights on the TS servers, you can install the Windows Server 2003 Administration Tools Pack and use Terminal Services Manager to find all of your sessions.

http://technet.microsoft.com/en-us/library/cc753032.aspx

http://www.microsoft.com/en-us/download/details.aspx?id=6315

0

You might give this guy a try:

http://www.microsoft.com/en-us/download/details.aspx?id=21101

It manages a number of RDP sessions in one tool, and I believe it indicate which ones you've simply "closed"

2
  • It does not - although I do like using it, it doesn't have this feature.
    – mfinni
    Jun 26, 2012 at 21:25
  • Ahh ok, glad you like it, sorry it didn't do what you were looking for.
    – Univ426
    Jun 27, 2012 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .