Wednesday, January 11, 2012

Find Out Who Is Logged Into A Server And Kick Them Off

Every tried to log onto a server only to be told that there are too many people already logged on and you'll have to wait. Thankfully in server 2008 R2 this is taken care of by being able to kick them off! But for server 2003 you wont be told who is logged on or if they are even using it. But there is something you can do!

Log on to another server and run a command prompt.

Type in
query session /server:YOURSERVERNAME 

Where YOURSERVERNAME is the name of the server.

And if you find out that someone has logged in and then left it, you can kick them off too - the above command will tell you each user's session id and you can use this to boot them off the box.

rwinsta /server:YOURSERVERNAME 1

In the above example you can see that the session ID used is 1. Try it, and dont leave yourself logged on after!