Log Off User remotely – cmd

If you ever wondered how to log off user remotely (or locally) via command line try this. As usual membership of the local admins group is needed.

Start cmd with elevated privileges.
check logged user and their session number with qwinsta:

QWINSTA /server:computername

Memorize the session ID
and use the logoff command:

LOGOFF sessionID /server:computername.

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.