Reset Terminal Services session

I'm posting this mostly for my own future reference. Every few months I find I need to kick someone off of a windows server that I help maintain, and I can never remember the commands to accomplish that, so here's the scoop:

For future reference:

Qwinsta - queries TS sessions, to get a session ID

Rwinsta - resets the TS session found with the previous query.

‘query' is another command that does something almost exactly the same.

You can do this remotely by supplying a servername as one of the parameters. I believe these are included by default on xp professional, and 2008 server. Home editions of xp or vista won't have the programs.

Google is your friend. 🙂