12 lines
856 B
Markdown
12 lines
856 B
Markdown
# How to autologoff a User from PC when the PC is idle
|
||
|
||
Original: [Link](https://devblogs.microsoft.com/oldnewthing/20190723-00/?p=102727)
|
||
|
||
1. Use policy to enforce a screen saver with the desired idle timeout. It doesn’t matter what the screen saver is, as long as it’s a screen saver. The Blank screen saver works fine for this purpose.
|
||
|
||
2. In Local Security Settings, Advanced Audit Policy Configuration, System Audit Policies, Logon/Logoff, configure “Other Logon/Logoff Events” to audit Success events.
|
||
|
||
3. Define a scheduled task as follows:
|
||
When running the task, use the following user account: Users.
|
||
Triggers: Begin the task: On an event; Settings: Basic; Log: Security; Source: Microsoft Windows security auditing; Event ID: 4802.
|
||
Actions: Start a program; Program/script: C:\Windows\System32\shutdown.exe; Add arguments: /l /f. |