Windows remote session monitor and control

This tip would help you retrieve the list of users currently logged on to a remote windows server and disconnect any user if required.

To see the list of user sessions on a remote windows server, use either of the below queries.

“query session /SERVER:<servername or IP Address>”


“qwinsta /SERVER:<servername or IP Address>”

To terminate a session, note down the session ID from the output obtained from above commands. Execute below commands to terminate a session.

  1. “net user /user:<Administrator login> \\<servername or IP Address>\C$” . Enter password when prompted.
  2. Execute “reset session <ID> /SERVER:<servername or IP Address>” or use the command “rwinsta <ID> /SERVER:<servername or IP Address>”

Author: Sherbaz

Being a gadget enthusiast, He always felt good to try new programming languages and techniques. But never goes in-depth anywhere. was found when he tried php, html, javascript and mysql. Being an electronics engineer, he is also interested to build small gadgets and tools in embedded and digital electronics. As a profession, he handles microsoft sql server database and calls himself a database administrator

Leave a Reply