How can I clear all the remote desktop session remotely

There are 2 methods to do this:

Method 1:

Open CMD with admin right, then —

A. Type “qwinsta /server:xxx.xxx.xxx.xxx” into the window, replacing “xxx.xxx.xxx.xxx” with the IP address of your server. When you hit “Enter,” a list of active remote-desktop connections will appear. Each session will have an ID number assigned to it.

B. Use the “rwinsta /server:xxx.xxx.xxx.xxx id” command, replacing “xxx.xxx.xxx.xxx” with the IP address of your server and “id” with the ID number of the session you want to end. When you hit “Enter,” Windows will end the selected session.

Method 2:

A. Go to CMD prompt and run “quser /server:YOUR_SERVER_NAME”, it will list all the remote connection.

B. Still in CMD prompt, run “logoff rdp-tcp#123 /server:YOUR_SERVER_NAME”(where 123 is the sessionname)

Leave a Reply

Your email address will not be published. Required fields are marked *