RSS

Category Archives: Old Way

Forced logoff remotely – the old way.

This post is somewhat the successor of the previous post because at one of our patching days, one of the servers (Windows Server 2003 R2) had exceeded the maximum number of allowed connections it can handle parallel. So I had to get in to the server. Here is what  I have figured out. I queried the sessions with

query session /server:<servername>

and it retuned something like this:

PrtScr capture

Now I only had to figure out how to kick the user remotely. I had suspected that the “logoff” command should be able to go remote but never checked. Now it was the time to do so. So I was true the “logoff /?” command showed me that this command has many-many switches to be used and one of them was waiting for me to use it.

logoffSo if I ever wanted to kick someone in the future remotely off a server I only have to query their “sessionid” and know the name of the server.

For example: LOGOFF /SERVER:<mordor> <sessionid>

Cheers,Daniel

 
Leave a comment

Posted by on December 18, 2014 in Old Way

 

Tags: ,