Group Policy Lock Screen: Configuration Guide

In this guide, you will learn how to enable the Windows lock screen using group policy. In addition, I’ll show you how to disable (exclude) the lock screen policy from specific users and computers.

I will walk through creating a policy to lock the screen after 15 minutes of inactivity. You can change the timeout settings to whatever meets your needs. This guide will work on Windows 10, Windows 11, Server 2012, and later operating systems.

The lock screen is an important security measure for when a user steps away from their desk and forgets to lock the screen. If this happens another employee or unauthorized person could access the user’s data. A lock screen idle timeout policy will help prevent this security issue.

Let’s check it out.

Important: Most articles show you the wrong GPO settings for windows 10 computers. If you enable the screen saver settings in group policy they will not work with windows 10. You will need to use the GPO settings I provide in this guide for the lock screen to work correctly.

Step 1: Determine GPO Location

The lock screen policy is a computer policy, this means anyone that logs into the computer will get the lock screen policy applied. Later I will show you how to exclude specific computers from the policy.

It’s best to apply this policy to all computers but there will always be exceptions. I’ve had requests to exclude conference room computers, computers that are used for 24/7 monitoring, then of course there are always a few users that complain and want it disabled. These requests should all be approved by upper management.

Depending on your OU structure you could apply the GPO to the root and let the sub OUs inherit the policy or you could apply the policy to specific OUs.

In this example, I want the policy to apply to all computers so I’m going to link the GPO to my ADPRO Computers OU. All the sub OUs will inherit the policy. In step 4, I’ll show you how I exclude specific computers from the policy.

Step 2: Create a new GPO for the lock screen settings

Do not add these settings to the default domain policy. It is group policy best practice to not modify the default domain policy and instead create a new one.

1) Open the group policy management console

2) Right Click “Group Policy Objects” and click new

Give the new GPO a name. You can name it whatever you want.

The GPO is created but now we need to set the idle timeout settings.

There is only one group policy setting that needs to be set. It is the “Interactive Logon: Machine inactivity limit”

Browse to -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options

Group Policy setting to lock screen after idle for 15 minutes

Change the value to whatever you want. I set mine to 900 seconds which is 15 minutes.

Step 3: Apply the lock screen GPO and verify its applied

The GPO is created and the policy settings have been added. Now you just need to link the GPO to the correct OU.

Since this is a computer policy you must apply the GPO to an OU that contains computer accounts. If you apply the GPO to an OU with users only the lock screen will not work.

1) In the group policy management console right click an OU and select “Link an Existing GPO:

Link existing GPO to and OU

2) Select the GPO you created in step 2 and click OK.

The GPO is now linked.

The GPO refresh interval is 90 minutes on a computer. So keep in mind it could take up to 90 minutes before this policy gets applied to all computers. You can instantly refresh this by rebooting the computer or running the gpupdate /force command.

Above is a screenshot showing the GPO linked to my ADPRO Computers OU. All of the sub OUs will inherit this policy. So computers in the Accounting, HR, and IT OU will get the lock screen GPO applied.

How to Verify the Lock Screen GPO is applied

To verify the GPO is applied to a computer you can use the gpresult /r windows command. You will need to open the Windows command prompt as administrator or it can fail to pull the computer policies.

You can see above the “Lock Screen ON” GPO is applied to this computer.

Step 4: How to Disable (exclude) computers from the lock screen policy

Let’s say you have the lock screen applied to all computers but now you need to disable it on specific computers.

There are two options:

Option 1: Move the computers into a new OU and not link the GPO to this OU. This works and I’ve used this method for several clients.

Option 2: Create a security group, add the computers and deny the policy from applying to this group. This is my preferred method as I think it prevents moving computers around between OUs.

I’m going to show you option 2.

1) Create a security group and add the computers that you want the lock screen policy disabled on. It’s very important to name the group with a descriptive name and use the description box.

2) Go into the group policy management console, select the GPO and click the delegation tab then click advanced.

3) With the security settings windows open click on Add

4) Add the security group and click ok

5) Make sure Read is set to “Allow” and Apply group policy is to “Deny”.

That should do it. The computers in your deny group will need to be rebooted.

When you check a computer with the gpresult /r command the policy will show as denied

Verify the lock screen policy is denied with the gpresult command

To deny any additional computers all you have to do is add them to the security group. I find this method more convenient than moving computers around to different OUs.

Recently Modified GPO Report

The AD Pro Toolkit includes over 200 Active Directory reports such as All GPOs, recently created or modified GPOs, computer or user settings disabled, and much more.

Here is an example report of GPOs modified in the last 30 days.

Download a free trial and create your own GPO reports.


Enforcing the lock screen on company computers is a very common requirement. Any company that gets audited will always get asks if this policy is in place, regardless it’s a good policy to have in place. Have fun with those exclusions, ha.

Recommended Tool: Active Directory Pro Toolkit

The AD Pro Toolkit includes 14 tools in 1 to help simplify and automate Active Directory management.

Automate user creation, bulk update accounts, group management, logon reports, report NTFS permissions, cleanup, and secure AD, troubleshoot account lockouts, and much more.

In addition, the toolkit includes over 200 built-in reports.

Click here to download a free trial

37 thoughts on “Group Policy Lock Screen: Configuration Guide”

    • Avatar photo

      Did you try the steps in my guide? I double-checked and it works. You don’t need to enable any screensaver settings (user configuration or computer).

      • Avatar photo

        I tested with a windows 10 computer running 2019 domain controllers.

        • Hi Robert,
          Thanks for replying and for a really helpful AD/GP website!
          I did get this to work.

          What are your thoughts on the Microsoft Article and why they state the Screen Saver needs to be enabled? Its seems misleading.

          • Avatar photo

            The screen saver is different than the lock screen so not sure why they said it should be active. It might be saying the lock screen also activates when the screensaver activates.

    • Hi Ryan, thanks for the link to the that article it has answered a question that arose from following the steps above.

      From what I can read in that article from Microsoft they can’t make up their mind. The screen saver doesn’t have to be active to force the logout in my opinion. The inactivity setting being defined actually affects the screen savers behaviour not the other way round. If you define inactivity limit it doesn’t matter if the screen saver is not set to require a login or if the screen time out in power saving kicks in first you will still need to log in again no matter what.

  1. Hi Robert,
    Thanks for replying and for a really helpful AD/GP website!
    I did get this to work.

    What are your thoughts on the Microsoft Article and why they state the Screen Saver needs to be enabled? Its seems misleading.

  2. Hi there,

    is there a way to make this work for multiple images?
    for a company for instance – group policy

  3. hi sir,

    as per your steps, I’m applied on my network same steps.
    my policy his applied but my lock screen not showing.

    • What is the best way to change the lockscreen image for Windows 10 Pro with a domain GPO? Can that be done?

      • Avatar photo

        Hi, Bill

        There is a GPO for this called “Force a specific default lock screen image” policy location is -> Computer Configuration > Policies > Administrative Templates > Control Panel > Personalization

        You will need to host the image in a location that can be accessed by all computers such as a file server (with a shared folder).

  4. Does this setting assume (and only work for) domain-connected workstations? How does it affect a remote user? A domain user, but who is working off the domain?

    Does “Interactive logon: Machine inactivity limit” require that the user have their password checked by a domain controller after x minutes, or will the local “cached credential” will be accepted and unlock the workstation?

    If some (most nowadays due to WFH and COVID) users are not connected to the domain (no VPN, not using Azure AD), there will not be a server available to confirm their password.

    The screensaver on the other hand, doesn’t actually authenticate the user, it will allow the user into the computer if the correct “cached credential” password is entered.

    • Avatar photo

      The computer would need to connect to the domain at least once to download the GPO lock screen policy, it would then work offline.

      There are other options for pushing policies out to non-domain-joined computers such as Intune and PolicyPak.

  5. Thank you for the reply and for the references to other policy management solutions.
    Appreciate it.

    • Avatar photo

      No problem. There are other solutions those are two I’ve used recently.

  6. Just to let you know that you need to use Windows 10 Enterprise. This isn’t supported with the Pro version.

    • Avatar photo

      Eric, that is incorrect. This works and is supported with the pro version.

  7. Your path is incorrect, according to your picture. Should be:

    Browse to -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options

    • Avatar photo

      Thanks, I have updated it.

  8. Hello, I can’t see the “local policies” in the security settings. Windows server 2019.

  9. Hi,

    works geat.
    Is there a way to do the following:
    After 10 minutes => show lock screen
    After 30 minutes => show screensaver

    When i set the “Interactive Logon: Machine inactivity limit” parameter, the screensaver is starting immediately.

    Many thanks.

  10. Hello,

    Is there a way to log off the user after 30min of inactivity?

  11. How is this achieved on Windows 11? This GPO does not work.

    • Avatar photo

      Just tested this on Windows 11 and it works.

    • Thanks so much, Robert. These steps worked for me.

  12. Hi Robert,
    I create the lockoff GPO in 2 mins (120 sec) to test.
    the GPO applied to the client work station properly (Windows 10 enterprise), and I check the local GPO and see it there. But it doesn’t lock off after 2 mins; even I waited longer than that without any activities. You have any idea? Thank you!

  13. Hi, great article.
    I have a small issue, I created a test Win10 VM. I joined it to my domain. I moved it to the OU i wanted to link the gpo with. I created the GPO and linked it. Did gpupdate /force. But for some reason the GPO is not being applied on that VM.
    I waited 90minutes. VM and DC are on the same network. Another GPO is working.

    Do you have an idea what it could be?

    Thank you for

  14. This worked for me with Windows 10 pro and windows 11, thanks!!

  15. Hi Robert,

    It worked to mine too.

    BTW, do you have configuration of “Moderating Access to Control Panel”?

    I tried to do the configuration Microsoft recommendation but it’s not working.

    Thank you

  16. it looks to be that a user with local-admin priv’s can change the actual screen-saver to a diff selection and then adjust the wait-time. Seems to require addt’l user-level settings in the GPO to completely nail that down ?

    • Avatar photo

      If the settings are not configured in a GPO then yes a local admin can change them. But it would be changing the local GPO settings and would only affect the local computer.

  17. Thanks Robert,

    I created a GPO to lock screen after 15 minutes. It worked on all domain joined computers. I then created a group to deny the lock screen policy for a specific Dept. and I can see that it’s denied using gpresult /r however those computers still lock after 15 minutes. Sleep settings are set to never. Any ideas?

    • Same happened to me.
      Even if I disable the whole setting via GPO, computers in domain still have the last setting. I have no idea how to resolve this. How can I put all this back to default?

  18. They GPO works fine for 90% of my user. They other 10% lock out after 60 sec.

    I can fixit by going into Screen Saver Settings. Turning it on, change the value 1 min to 15 min. And turn it back off. Now the user doesn’t lock out after 60 sec.

    But why is this happening and can I make this change on a global scale ?


Leave a Comment