ESX Virtualization

VMware ESXi, vSphere, VMware Backup, Hyper-V... how-to, videos....

Nakivo Backup and Replication - #1 Backup solution for Virtual, physical, cloud, NAS and SaaS

Menu
  • Certification
      • VCP-DCV vSphere 8
          • vcp2024-125.
        • Close
    • Close
  • VMware
    • Configuration Maximums
    • vSphere
      • VVF 9 and VCF 9
      • vSphere 8.0
      • vSphere 7.0
      • vSphere 6.7
      • vSphere 6.5
      • vSphere 6.0
      • Close
    • VMworld
      • VMware EXPLORE 2024
      • VMware EXPLORE 2023
      • VMware EXPLORE 2022
      • VMworld 2019
      • VMworld 2018
      • VMworld 2017
      • VMworld 2016
      • VMworld 2015
      • VMworld 2014
      • VMworld 2013
      • VMworld 2012
      • VMworld 2011
      • Close
    • Close
  • Microsoft
    • Windows Server 2012
    • Windows Server 2016
    • Windows Server 2019
    • Windows Server 2025
    • Close
  • Categories
    • Tips – VMware, Microsoft and General IT tips and definitions, What is this?, How this works?
    • Server Virtualization – VMware ESXi, ESXi Free Hypervizor, VMware vSphere Server Virtualization, VMware Cloud and Datacenter Virtualization
    • Backup – Virtualization Backup Solutions, VMware vSphere Backup and ESXi backup solutions.
    • Desktop Virtualization – Desktop Virtualization, VMware Workstation, VMware Fusion, VMware Horizon View, tips and tutorials
    • How To – ESXi Tutorials, IT and virtualization tutorials, VMware ESXi 4.x, ESXi 5.x and VMware vSphere. VMware Workstation and other IT tutorials.
    • Free – Free virtualization utilities, ESXi Free, Monitoring and free backup utilities for ESXi and Hyper-V. Free IT tools.
    • Videos – VMware Virtualization Videos, VMware ESXi Videos, ESXi 4.x, ESXi 5.x tips and videos.
    • Home Lab
    • Reviews – Virtualization Software and reviews, Disaster and backup recovery software reviews. Virtual infrastructure monitoring software review.
    • Close
  • Partners
    • NAKIVO
    • StarWind
    • Zerto
    • Xorux
    • Close
  • This Web
    • News
    • ESXi Lab
    • About
    • Advertise
    • Archives
    • Disclaimer
    • PDFs and Books
    • Close
  • Free
  • Privacy policy

How to Disable Auto Lock on Windows Server via Group policy

By Vladan SEGET | Last Updated: March 24, 2017

Shares

The problem with the auto lock feature is that it really slow down when working in a multi-server environment in a lab. This is especially true of lab environments. Servers in lab environments are usually used much more than usual production servers. So, in the long run, the automatic lock can be especially painful. In this post, we will learn How to Disable Auto Lock on Windows Server via Group policy, for a home lab environment, by creating and applying a group policy.

When working on a single server it's usually ok, but when you are working on multiple servers at the same time and every time you jump to do something you are in front of a locked server, again, and again. Or even better. You're running some PowerShell and waiting for a PowerShell command to complete or waiting for an update to install. Nothing more annoying to have to log in again to that server.

Today we'll stop doing it. We will show you that it will take you only 5 min to Disable Auto Lock on Windows Server via Group policy. The tool you need is Group policy console (GPO). You can invoke GPO console from the command line via “gpmc.msc” (Group Policy Management Console snap-in). I assume that you have built a Microsoft Active Directory domain (AD) in your lab. In this case, when you connect to your domain controller server, you should have the GPO console already installed.

I assume that you have built a Microsoft Active Directory domain (AD) in your lab. In this case, when you connect to your domain controller server, you should have the GPO console already installed, because for standalone servers the console might not be installed (It's a Feature which needs to be added).

Open a command prompt > type “gpmc.msc” to open your GPO console. Then navigate to Group Policy Objects tree >  right-click on the Group Policy Objects, and chose New.

How to create a GPO

Then Link the GPO (via drag and drop) to the Organizational Unit (OU) within your AD where your lab servers are located. In my case, the OU's name is “No Lock test”. Note that if it's only a lab environment, one could consider linking this GPO to the domain, like this every computer/server joined to the domain would never get the lock screen activated.

BUT, if you still prefer your DC not being treated as an everything else, just create a separate OU and link the GPO to that OU.

How to Disable Auto Lock

Next, Right-click the “nolock” GPO object and chose Edit. This opens a new window. Navigate to:

Navigate to:

Computer Configuration > Policies > Windows Settings > Security Settings > Local Policies > Security Options > Interactive Logon : Machine inactivity limit

There you'll see:

How to Disable Auto Lock GPO

Double-click the branch and set it as follows:

  • Check the Define this policy settings check box
  • Put 0 seconds for the “Machine will be locked after”

How to Disable Auto Lock GPO settings

How to make sure that the GPO settings are applied right now?

By default, computer Group Policy is updated in the background every 90 minutes, with a random offset of 0 to 30 minutes. In addition to background updates, Group Policy for the computer is always updated when the system starts.

Option 1: Via command line

Initiate a refresh of the GPO via command line. To initiate a refresh or to force a GPO application, open a command line utility with admin privileges and type:

gpupdate /force

The policy will be applied.

How to Disable Auto Lock - Force the GPO

Note that the systems which are inside the OU, must all refresh their GPOs. The process is usually done during restart, or at some time intervals. You can also use PowerShell cmdlets to remotely refresh Group Policy settings for all computers in an organizational unit (OU) from one central location.

Option 2: Via GPO console

Or you can also use the same console where you were creating the GPO – The Group Policy Management Console (GPMC).

Group Policy Refresh on a OU

And when invoked, you'll see this confirmation screen… We only have 1 computer within this OU so the settings will be updated on 1 computer only…

Group Policy Refresh on a OU window

Third option would possibly be Windows PowerShell. You can use the Invoke-GPUpdate Windows PowerShell cmdlet to refresh Group Policy for a set of computers.

Wrap-up:

As you can see, by simple steps you prepare your home lab for being more productive. The steps are really simple and fast. Every time you'll create a new server, new VM, within your environment, and put it in a particular OU to which you'll apply the GPO which Disable Auto Lock, you never have to type the password, except after a reboot(s).

Microsoft Technet is my source for Microsoft “stuff”. Whether you're seeking for a solution in a lab, or enterprise environment, you can find a solution either via Technet blog posts or forums. I can only highly recommend learning from those ecosystems.

You should probably leave the lock screen enabled unless you have a very good reason to disable it via GPO. When you think, it is the basic (and efficient) protection against data theft within enterprise environments. But for some situations, where the auto lock is not productive, such as lab environments, it is good to know how to disable it.

More from ESX Virtualization:

  • What is VMware Storage DRS (SDRS)?
  • What Is Erasure Coding?
  • What is VMware Orchestrated Restart?
  • What is VMware Cluster?
  • What is The Difference between VMware vSphere, ESXi and vCenter
  • What is VMware vSphere Hypervisor?

Stay tuned through RSS, and social media channels (Twitter, FB, YouTube)

Shares
5/5 - (2 votes)

| Filed Under: Home Lab, How To, Windows Server 2012, Windows Server 2016 Tagged With: How to Disable Auto Lock on Windows Server via Group policy

About Vladan SEGET

This website is maintained by Vladan SEGET. Vladan is as an Independent consultant, professional blogger, vExpert x16, Veeam Vanguard x9, VCAP-DCA/DCD, ESX Virtualization site has started as a simple bookmarking site, but quickly found a large following of readers and subscribers.

Connect on: Facebook. Feel free to network via Twitter @vladan.

Comments

  1. Jim Kramer says

    February 15, 2018 at 10:09 pm

    this doesn’t work.

  2. Scott Keith says

    August 20, 2019 at 3:22 am

    This article is incorrect. That policy only applies if you are using bitlocker. If you look in the explanation it clearly states that.

    “The machine lockout policy is enforced only on those machines that have Bitlocker enabled for protecting OS volumes. Please ensure that appropriate recovery password backup policies are enabled.”

Private Sponsors

Featured

  • Thinking about HCI? G2, an independent tech solutions peer review platform, has published its Winter 2023 Reports on Hyperconverged Infrastructure (HCI) Solutions.
  • Zerto: One Platform for Disaster Recovery, Backup & Cloud Mobility: Try FREE Hands-On Labs Today!
Click to Become a Sponsor

Most Recent

  • Dream Lab with PCIe Gen 5.0 M.2 NVMe Storage
  • Backup solution that supports 15+ Hypervisors – Vinchin Backup and Recovery
  • Why NordVPN is Your Must-Have for Business Security and Personal Freedom
  • Agentless Backup Solutions for XCP-ng Hypervisor: External Vendor Options
  • Vinchin Earns Acclaimed Recognition in Gartner Peer Insights 2025 Report
  • VMware vSphere 9 Standard and Enterprise Plus – Not Anymore?
  • Free Virtual Backup Appliance from StarWind – With Community Support (example configuration for ESXi and Veeam Backup)
  • VMware vSphere Foundation (VVF 9) and VMware Cloud Foundation (VCF 9) Has been Released
  • Veeam Backup & Replication 12.3.2 – patch critical vulnerabilities for your dataprotection environments
  • Veeam confirming vSphere 9.0 and ESXi 9 upcoming support

Get new posts by email:

 

 

 

 

Support us on Ko-Fi

 

 

Buy Me a Coffee at ko-fi.com

Free Trials

  • DC Scope for VMware vSphere – optimization, capacity planning, and cost management. Download FREE Trial Here.
  • Augmented Inline Deduplication, Altaro VM Backup v9 For #VMware and #Hyper-V – Grab your copy now download TRIAL.

VMware Engineer Jobs

VMware Engineer Jobs

YouTube

…

Find us on Facebook

ESX Virtualization

…

Copyright © 2025 ·Dynamik-Gen · Genesis Framework · Hosted with HostColor.com