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

If you remote onto a Windows server with any kind of regularity, you will probably have come across a scenario where the number of concurrent connections has reached the limit or you have users logged in and you don’t know who the hell they are…

I found today using the wonderful power of Google that there is a command to look and see who is logged in.
From DOS Command Line type in:

query session /server:YOURSERVERNAME

YOURSERVERNAME Denotes your servers actual name.

If you want to boot any of the users off use this Command Line gem.

rwinsta /server:YOURSERVERNAME 1

YOURSERVERNAME Denotes your servers actual name. And 1 is the user ID.

No more getting up and running to the physical server to login to remote desktop and its also an easy way to check who is logged in for server reboots.