We have mission-critical Windows 7 workstations on our network that must be available to any user at any time, even when it has been locked by a prior user. Thus, we have fast user switching enabled. Unfortunately, it's not unusual for us to have a dozen or more different users logged onto the same machine at the same time, with a corresponding degradation in service.
We've done our best at educating the masses to log off at the end of their shift. But users being users, this does not happen on a consistent basis. Does anyone know of a clean way to force logoff idle users after a certain amount of time has elapsed? I am open to any method that could be deployed/configured via script, GPO, or SCCM.
You can setup a GPO to push out a scheduled task that would run this program for all users or if it's just the one system simply make a scheduled task for all users.
You could try setting everyone's permitted logon hours from 12:00am to 11:59pm (notice the one minute gap), with forcible logoff configured (in
gpedit > Computer > Windows Settings > Security Settings > Local Policy > Microsoft network server: Disconnect clients when logon hours expire
). That way, everyone who is logged on to any computer will be forcibly logged off at 11:59pm. However, this may not work in your scenario, depending on how unpredictable your user's work times are.@Bigbio2002, this does not log off users. The Disconnect Clients when Logon Hours Expire is for servers - when users are connected with SMB, this setting will disconnect users connected to that server. It does not log off interactive Windows sessions.
The best way to do this is to set up a GPO with a Scheduled Task that logs off the user. GPME/UserConfig/Pref/CtrlPanelSettings/ScheduledTasks. The only caveat is that you can only apply this to OUs, but if you're AD is organized, this should work well.
I have contributed a small application that force logout users after a configurable timeout for that very purpose, I could not find any good solution so I made one myself, very simple but the only that worked so far.
Code and binaries are available on gitHub: https://github.com/lcoulet/windows_AutoLogoff
I hope this helps.