There are machines in a shared lab. Sometimes someone will lock the machine with the intention of coming back, but for whatever reason they do not. Currently the machine is powered off so another user can use it.
What would be nice would be to set a timer, say 20 minutes, then have a button display that could allow the next user to claim the machine. It should logout the current user and present the login screen to the next user.
Is there a Group Policy setting or perhaps some other means (Windows Credential Provider) to force a user logoff when a machine has been locked for a specified period of time?
For your first question, a local administrator can force a logoff or a normal user can switch the user in that windows with the option switch user
For the second question, it's a workaround, but it would be to create a local planned task with a on idle trigger with a 30 minute condition and the task will run shutdown /l
I was thinking of a scheduled task as well, but the task runs as SYSTEM or a specific user. You would need to pull a list of users and inactivity times, and then process them. My suggestion would be a sceduled task to kick off ever 30 or 60 minutes.
Script to pull list of users with inactivity times: https://gallery.technet.microsoft.com/scriptcenter/Get-UserSessions-Parse-b4c97837
Then you can just pipe that to some filtering and then to an invoke logoff command: https://stackoverflow.com/questions/18192746/powershell-log-off-remote-session
If are not familiar with powershell, post a comment, and I could throw something together.