How to lock screen after xx minutes of inactivity in windows 10?

Usually, forget to lock your computer screen after leaving desk? For security purpose, Windows provides a feature for locking your computer immediately or period of time, you can automatically lock Windows 10 if your system has been idle for too long also. The setting has been there from the very start and it is, in fact, a feature that was present in Windows XP, Vista, 7, and 8/8.1.

There are many ways to do that. You can set up on either UI or using command and also can force by Domain Group Policy Object (GPO).

Basic and immediately lock your computer by pressing both Win + L

Auto Lock screen using Screen Saver

Right-click on the Computer Desktop > Personalize > on the left panel click Lock screen, scroll down you will see the Screen saver settings


On the Screen Saver Settings, enable a Blank screensaver and time to wait is one minute of my testing. It will automatically lock Windows 10 for you if you’ve been inactive too long. That’s it, let’s try.


Force locking by using Domain Group Policy Object (GPO)

For enterprise you cannot manual setup on each Computer, it will take a bunch of time to do. GPO will on behalf us to do that, it also forces End-User cannot change the configuration.

To get the target, open Domain Group Policy Management > Create a GPO in this Domain …..

Set a GPO name, e.g. Lock Machines idle after 15 Minutes

Edit the GPO, go to User Configuration > Policies > Administrative Templates > Control Panel > Personalization

Enable screen saver: set Enable state
Password protect the screen saver: set Enable state

Screen saver timeout: set 900 seconds

Force specific screen saver: set Enable then copy/paste rundll32 user32.dll,LockWorkStation into Screen saver executable name field.


At client you will see the computer forced by GPO, cannot change any configuration.


That’s it, hope it helps. Thank you for reading.

Leave a Reply

Notify of