NetWiki

I can make net work

User Tools

Site Tools


windows:timed_logout

Windows Timed Logout

We've started using laptops as troubleshooting jump boxes. We can plug them into the wired network and then RDP to them so we can troubleshoot wireless in another office. One problem with Windows is that only a single user can log in at a time and you can't kick them out. They have to log out or someone has to reboot the box if they forget to logoff.

Put this batch file in All Users Startup and Desktop as a workaround.

Batch File

@ECHO off
echo When this timer expires you'll be logged out.
echo.
echo You can Ctrl+C or close the window to stop the batch file but don't forget to logoff or you lock everyone else out.
echo.
echo =======================
 
@REM Timeout pauses until the timer expires in 3600 seconds. 
@REM   It can normally be skipped by hitting any key but that would log you off NOW so /nobreak prevents that.
timeout /t 3600 /nobreak
@REM Shutdown /l logs you off.  Shutdown has a /t (timer) option but it doesn't work with /l (logoff), only with /r (reboot).
shutdown /l
windows/timed_logout.txt · Last modified: 2023-08-26 22:00 by dave

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki