Logged user on Remote Desktop

2

Is there a way to query a distant host as to whether someone is currently logged in through Remote Desktop? Or that there is a currently active connection?

Asking because bumping users on a workstation has become an issue, and I'd like to check without bothering them.

MPelletier

Posted 2011-07-05T15:08:30.300

Reputation: 704

Answers

2

You can use the query command if you are within the local network. For example:

Query session /server:*yourservernameorIP*

you can use both friendly names and IPs in the "/server:" section.

For more info on Query commands see here.

Supercereal

Posted 2011-07-05T15:08:30.300

Reputation: 8 643

Awesome. At least it would be if I didn't get an "Error 1722 getting sessionnames" and "Error [1722]:The RPC server is unavailable". While I am connected from the same machine! Almost tempted to start a new question on that. – MPelletier – 2011-07-05T15:27:30.580

Bad phrasing. Your answer is awesome, my situation is not. – MPelletier – 2011-07-05T15:28:45.103

When connecting to a workstation, you may need to allow remote RPC access.

– user1686 – 2011-07-05T15:32:40.243

1Also, once you get query working, you should take a look at "Terminal Server Administration Tool" (downloadable as part of Windows 2003 Admin Tools). – user1686 – 2011-07-05T15:34:16.607