Have you ever tried to remote into a windows machine and couldn't because the machine had exceeded its available sessions? Can't RDP into a machine because there are already 2 active sessions? Want to play party tricks on your friends and wow them with your "techie-ness?!"
Say hello to my little friends qwinsta and rwinsta (AKA query session and reset session, respectively)
The Disappearing Session Magic Trick
Open a command line. Find the computer in your network you want to query. Type this, smile, and have a coke:
qwinsta /server: serverName
Now find the session ID for which you want to reset the session (AKA boot the user!) under the ID heading. Issue this sweet mother of a command:
rwinsta sessionId /server: serverName
Wait a few moments while it does it's thing. When the command line comes back type:
qwinsta /server: serverName
Tada! That user is gone. Possibly upset, too. Hopefully they weren't working on anything important! Otherwise now is the time to play the blame game and point to all of your other co-workers!
Notes: You must have admin rights to the remote server.
Disclaimer: Use responsibly. I am not responsible for lost time/work/etc. You accept all responsibilities when using this information. I reserve the right to make up other legal jargon at a later time to get me out of legal issues for something you did because you read this. Just because I give you the gun and bullets doesn't make me responsible for you shooting someone. Seriously, have you read most disclaimers lately? Have a sense of humor already. Are you still reading this?!
References (and others too countless to reference):
http://technet.microsoft.com/en-us/library/cc731503.aspx
http://technet.microsoft.com/en-us/library/cc754785.aspx
http://weblogs.asp.net/owscott/archive/2003/12/30/46776.aspx
http://drowningintechnicaldebt.com/blogs/royashbrook/archive/2007/03/29/qwinsta_2C00_-rwinsta_2C00_-and-reg_2C00_-OH-MY_21002100_.aspx
http://www.doering.co.uk/doering/it_pages.asp?page=terminalservices_qwinsta
http://www.notes411.com/dominosource/tips.nsf/0/2913BC501C9F874D802571AA004E9580!opendocument
http://www.tomshardware.com/forum/172235-46-using-qwinsta-drop-terminal-services-sessions