question

SepehrNoori-4525 avatar image
0 Votes"
SepehrNoori-4525 asked SepehrNoori-4525 commented

Is there a way to check if a user connected by RDP is active?

I am trying to monitor activity on a windows virtual machine. One of the things I need to monitor is if the users connecting to the server using "Remote Desktop Connection" are actively using the window.
More specifically I want to run a script to check if a user has the Remote Desktop Connection on top in their own PC, but I want to be able to check that from the server.

remote-desktop-servicesremote-desktop-client
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered SepehrNoori-4525 commented

You can use query session and or qwinsta
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/query-session
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/qwinsta

--please don't forget to upvote and Accept as answer if the reply is helpful--



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you @DSPatrick, for your answer. The problem with this is the status check is the status of the connection and the "active" only means that the connection is active and open not that it is on top or on focus in their pc it might be just a window open on the original pc and it takes too long to change to "Idle" state.

0 Votes 0 ·