Is it possible to close remote desktop session on windows remotely?

Time to time I can't login to my Windows Server 2003 because there are to many open sessions. Is it possible to close them remotely(without physical contact in server room)?


Solution 1:

You can do it using the qwinsta and rwinsta command line tool:

qwinsta /server:SERVERNAME

You will get a list of the Remote Sessions in the command window. Make sure the account you're logged in on your client computer has admin rights on the server. You can also use the server's IP address instead of the server's name.

You need the session ID of the RDP session in order to disconnect a user. This command shows you all sessions

rwinsta /server:SERVERNAME SESSIONID

Solution 2:

You can connect to server with command mstsc -v:IP /admin. It is works even when there are to many open sessions.