Auto Logoff for inactivity

Jsmith 41 Reputation points
2021-09-01T14:54:52.917+00:00

Hello,

I'm trying to come up with a way on a local workstation to be able to log out an admin if they forget to log off for the day. I was thinking something like 5 minutes of being idle to force user to log off. I went through several forums, including this site, but nothing seems to work. I tried creating a scheduled task and tested it for one minute, but it doesn't work. I also tried using some third party program called "lithnet" and nothing happens after one minute.

This would be for a windows 10 workstation. Any idea on how I could set this up?

Windows for business Windows Client for IT Pros Networking Network connectivity and file sharing
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-09-01T15:08:06.567+00:00

    You can have your task or script use logoff command.
    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/logoff

    also
    https://devblogs.microsoft.com/oldnewthing/20190723-00/?p=102727

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. HawksFire 1 Reputation point
    2022-06-20T21:26:57.287+00:00

    Here is something that logs off any Idle user - it took a while, but take a look :
    https://bobby.kearan.net/2022/06/19/log-off-idle-user-with-quser-and-powershell/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.