How to remotely force kill a Remote Desktop session

4
78967

Sometimes, you need to kill a remote desktop session on the server remotely. In this article, we will use qwinsta and rwinsta commands to list and kill the remote desktop session on the server.

Get All Remote Desktop Session

You can run the command qwinsta to get all Remote desktop session on the server. For the example, I want to get all session from the server named wowhvdev1. 

qwinsta /server:wowhvdev1
qwinsta

Kill a Remote Desktop Session

After you get all session list from qwinsta command, you can use rwinsta command to kill a session from the server. This command Enables you to reset (delete) a session on a Remote Desktop Session Host (rd Session Host) server. Before we continue, please remember the “ID” that you get from qwinsta command.

rwinsta /server:wowhvdev1 RemoteID

You can replace the RemoteID with the ID that you get from qwinsta command.

4 COMMENTS

  1. qwinsta and rwinsta are no longer recognized in Win 10. But I am unable to fine the utility to use as a replacement. Anyone have this information?

  2. This doesn’t work with win 10. BTW, how does security work for this? there’s no way anybody can just get session info, right?

  3. Hello, my PC is using Win 10 and “qwinsta” and “rwinsta” command is still working as expected. btw, you need to have the access to the remote machine if you want to get the session info.

LEAVE A REPLY

Please enter your comment!
Please enter your name here