Do have any idea how to force the computer to log off? The situation is that
at work people don’t log off and leave sensitive information on their
It’s funny, I ran into exactly this situation years ago. I was walking by my
boss’s office and happened to see some interesting information on his screen.
Some very interesting information.
It was performance review time, and on his screen was a spreadsheet with all
the review and salary information.
Needless to say when he got back we solved that problem quickly, and the
same solution might well apply here.
Become a Patron of Ask Leo! and go ad-free!
The quickest solution: enable a screen saver, and ensure that “On
resume, display Welcome screen” is selected:
After the screen saver kicks in when the user returns to their computer
they’ll be presented with the Windows login screen. Assuming their account has
a password, they’ll have to enter the password to return to whatever it was
they were doing and see whatever it was they had on their screen.
It’s not a true log-off, but it does solve the problem of anyone walking by
being able to see or access what’s on the computer. And it’s exactly the
solution my boss implemented on his own machine.
(And, no, pointing that out to my boss didn’t hurt or help me in that
performance review :-) )
If you want to force a true log-off, I’m not aware of a way to make it
happen on inactivity, but then you probably don’t want it to happen that way
anyway. A true log-off will close all open applications and possibly lose any
unsaved data that the user had in those applications.
I do, in one case, force a log off on one of my machines in the middle of
the night. I do that by using the “psshutdown” command:
psshutdown -o -f
“-o” logs off the console user, and “-f” forces any running applications to
close. Psshutdown is one of the sysinternals utilities and can be downloaded
Using the task scheduler one could schedule psshutdown to be run at a
specific time each night, for example, to force a logoff. That doesn’t solve
the problem during the day, but it does force the log off.