Remotely log off a user

If you like every other sysadmin have users that simply forget to log-off, throw the following in a batch script.
This script will need to run with admin rights.

 

 

echo off
cls
echo What is the machine name?
set /p server=
quser /server:%server%
set /p session=
logoff %session% /server:%server%
quser /server:%server%

2 Replies to “Remotely log off a user”

Leave a Reply

Your email address will not be published. Required fields are marked *