Friday, October 7, 2016

How to Log off window user remotely

Back to basics.....This is something that we have a do every now and then because people (most of the time fellow IT guys) are so lazy ;) and tends to close the windows remote session directly instead off logging off properly and due to this when you try to login on a remote server, end up with Terminal server exceeded maximum connection limit message.

Note: This is basically useful on legacy windows OSs, like 2003 and prior, yeh  some of us might still have those servers. In windows server 2008 and later, if maximum remote sessions are in use, apart from this method during remote login it pops up a window to request or forcefully disconnect any active user (if you have adequate rights to do so). 

If you have the adequate windows privilege then can easily clear remote sessions remotely ;)

To do so, open command prompt on any other machine and run below commands,

First run following command to get a list of connected users,

C:/>quser /server:target _server_name

The output of this cmd would be a list of logged in user with corresponding session ID, note down the session id of remote user (eg. 1, 2, 3,…) you want to logoff, now

C:\>logoff session_ID /server:target_server_name

Once you hit enter, the user will logoff from remote computer and you are done here.

That's it... :)

No comments:

Post a Comment