Wndwj

Computer Lockout (Windows)

Locks workstation after 15 minutes idle

Description

The procedure will run some powershell commands to edit registry Key to create some Local Group/Security Policies to enable the computer to lock after 15 minutes.
This procedure is only compatible with Windows 7 and 10 endpoints.
To edit the idle time before the computer goes to sleep, you need to edit the "900" values lines 2 and 5.
The changes will only take effect after the endpoint is restarted. The restart is not part of the procedure in order to schedule it at the most convenient time.

Developer
  • Name: Douglas Sanchez
  • Company: Kaseya
  • Website: http://www.kaseya.com
  • Contact Developer
  • Summary
  • Computer Lockout (Windows)
  • 349 Downloads
  • Version:
  • Released on April 19th, 2017
  • Reviews
    Gravatar for Andrew Christopherson
    by Andrew Christopherson on August 14th, 2018

    This really helps out with some basic security. It's a great procedure if you have people who forget to lock their computers when they leave. Also, if you have a question about how to remove it from a workstation, check the discussion because the creator explained it there.

    Discussion
    Gravatar for David Osborne
    David Osborne almost 3 years ago

    I tried this on two machine, while it does lock the machines it does not prompt for password, can this be updated? or can i do something in the script to adjust this?

    Gravatar for Andrew Christopherson
    Andrew Christopherson about 2 years ago

    Does this procedure only run once or is it a permanent change? if it's a permanent change, how can I stop it?

    Gravatar for Douglas Sanchez
    Douglas Sanchez about 2 years ago

    @Andrew, The changes are permanent as they are getting applied via registry changes. 

    To stop it I suggest deleting the keys that get created: HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System\InactivityTimeoutSecs and/or HKCU:\Control Panel\Desktop\ScreenSaveActive, HKCU:\Control Panel\Desktop\ScreenSaverIsSecure, HKCU:\Control Panel\Desktop\ScreenSaveTimeOut, HKCU:\Control Panel\Desktop\SCRNSAVE.EXE

    Gravatar for Andrew Christopherson
    Andrew Christopherson about 2 years ago

    @Douglas, your suggestion seems to be working. Thanks for the quick response and the helpful procedure, I appreciate it.

    Gravatar for Leandro
    Leandro almost 2 years ago

    Does this work on windows 10?

    Gravatar for Andrew Christopherson
    Andrew Christopherson almost 2 years ago

    @Leandro, Yeah it does. I'm using it on Windows 10 and Windows 7 right now.

    Gravatar for Leandro
    Leandro almost 2 years ago

    Awesome. I just needed to restart the machine lol. Thanks! 

    Gravatar for Efraim Wolpin
    Efraim Wolpin about 1 year ago

    Hi, 

    i set this on a machine for a value of 300 (5 Min) but after a minute it locked. why is this happening?

    Gravatar for Douglas Sanchez
    Douglas Sanchez about 1 year ago

    There might be a GPO or some other settings overriding the config.

    Gravatar for Dom Ruz
    Dom Ruz 12 months ago

    Hi Just,

    I just want to confirm if this is only applicable for win 7  and win 10 cause as per Kaseya support it is applicable for any Win OS.

    Best Regards,

    Gravatar for Dom Ruz
    Dom Ruz 12 months ago

    Hi,

    I just want to confirm if this is only applicable for win 7  and win 10 cause as per Kaseya support it is applicable for any Win OS.

    Best Regards,

    Gravatar for Douglas Sanchez
    Douglas Sanchez 12 months ago

    Hey Dom, The procedure was tested on both windows 7 and 10. You may have to test and modify it to make it work on other OS'.