Disable Windows Server 2019 Auto Lock

One of the things that I’m battling for years – lock screen on Windows Server 2012/2016/2019.

It is lovely feature for enhanced security, and I recommend living with it in production environment, but for my testing scenarios, I get quickly annoyed by it.

I usually do multiple things in my test labs – reading something, watching a tutorial, and then I want to quickly try new PowerShell trick or some new option I learned – I look at my screen, and surprise – every one of my lab machines is locked – that tricks gets old fast if you are often distracted while testing and learning.

So, for every one of my new test labs I have few things that I configure first, one of them is disabling Turn Off Display Setting via Group Policy.

I’m doing this on my Windows Server 2019 lab on DC (domain controller) via Domain Group Policy. 

Open search and type – gpmc.msc

Group Policy Management will be opened. Right click on Default Domain Policy* and click on Edit

*I would recommend creating new containers (OUs) when adding new group policy rules.

From Computer Configuration choose | Policies | Administrative Templates | System | Power Management | Video and Display Settings | double click on Turn off the display (plugged in) setting

Select Enabled and under Options: Turn Off the Display enter 0 (zero) – this will disable Auto lock. Confirm with Apply | Ok. Close all the windows.

On another machine which is part of the domain in my lab I opened command prompt and run – gpupdate /force

After refreshing of the Group Policy finished, I opened Control Panel | Power Options | and clicked on Change plan settings on my preferred power plan, and here we are, turn off the display is disabled.

By setting this option through group policy I automatically set this option on all my machines in the lab (of course machine needs to be part of the domain).

Disclaimer