/
/

How to Enable or Disable Dynamic Lock to Automatically Lock Windows 11

by Mikhail Blacer, IT Technical Writer
How to Enable or Disable Dynamic Lock to Automatically Lock Windows 11 blog banner image

Instant Summary

This NinjaOne blog post offers a comprehensive basic CMD commands list and deep dive into Windows commands with over 70 essential cmd commands for both beginners and advanced users. It explains practical command prompt commands for file management, directory navigation, network troubleshooting, disk operations, and automation with real examples to improve productivity. Whether you’re learning foundational cmd commands or mastering advanced Windows CLI tools, this guide helps you use the Command Prompt more effectively.

Dynamic lock is a feature in Windows 11 that locks a device when a Bluetooth-paired device, usually a smartphone, goes out of range. It allows users to protect sensitive data and reduce the risk of unwarranted access in shared environments.

Windows’ Dynamic lock feature offers system admins and IT professionals a straightforward and automated method of securing workstations. It’s pretty valuable for multi-user environments, like office spaces and remote work setups, where leaving devices unattended can be risky.

This guide will present several ways to enable or disable Dynamic lock. We will use several methods, including Windows Settings, the Registry Editor, Command Prompt, PowerShell, and Group Policy.

Ways to enable or disable Dynamic lock in Windows 11

📌 Prerequisites:

  • These apply to all Windows 11 computers.
  • You will need admin privileges for methods involving the Command Prompt, PowerShell, Registry Editor, and Group Policy.
  • For the Dynamic lock to function correctly, you need a Bluetooth-enabled smartphone paired with a Windows 11 PC.
  • Both devices must be discoverable via Bluetooth and be near one another.

📌 Recommended deployment strategies:

Click to Choose a Method 💻

Best for Individual Users

💻💻💻

Best for Enterprises

Method 1: Windows Settings x
Method 2: Registry Editor
Method 3: Command Prompt
Method 4: PowerShell
Method 5: Group Policy Editor x

Method 1: How to turn Dynamic lock on or off using Windows Settings

This is the fastest and easiest way to enable or disable Windows Dynamic lock. It uses Windows Settings and won’t require scripting or other advanced tools.

📌 Use Cases:

  • This is best for individual and unmanaged devices, not for mass deployment.
  • IT admins and power users can activate this prior to deployment to test it out.
  • Suitable for laptops and tablets used in shared spaces.

📌 Prerequisite:

  • Before performing this step, connect your device to your chosen Bluetooth smartphone.

Check out these steps to enable or disable Dynamic lock in Windows 11 using Settings:

  1. Open Settings by pressing the Win + I shortcut.
  2. Head to Accounts > Sign in options.
  3. Scroll down and locate Dynamic lock. Click on it to expand the options.
  4. To enable, select the checkbox for “Allow Windows to automatically lock your device when you’re away.” To disable, clear the checkbox.

Dynamic lock settings

💡 Note: If the paired device goes out of range or disconnects, Windows will lock the screen after a short delay.

Method 2: How to use the Registry Editor to enable or disable Dynamic lock

Users can edit the registry to set Dynamic lock. This is crucial for environments where Group Policy is not available, or if you are planning to enforce the setting in a user account.

📌 Use Cases:

  • Best for Windows 11 Home, an edition that lacks the Group Policy Editor.
  • This is an excellent option for advanced users or IT admins who want to apply the settings manually or via script.

📌 Prerequisite:

  • This method requires administrator privileges.

⚠️ Warning: This step involves editing the registry, which may have unintended consequences. It would be best to back up the registry beforehand before making changes.

Here’s how to use the Registry Editor to toggle Dynamic lock.

  1. Open the Registry Editor.
    1. Use the Win + R shortcut to open the Run dialog.
    2. Type regedit and press Enter.
  2. Navigate to this key:
    HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Next, double-click the EnableGoodbye key. If it doesn’t exist, create it via these steps:
    1. On the right-hand pane, right-click and select: New > DWORD (32-bit) Value.
    2. Name the value: EnableGoodbye.
  4. Set the EnableGoodbye key’s Value data (Decimal) to:
    1. 1 = This enables Dynamic lock
    2. 0 = This disables Dynamic lock
  5. Click OK, then close the Registry Editor
  6. Restart your computer for the changes to take effect.

Method 3: How to use Command Prompt to toggle Dynamic lock

This lets you enable or disable Dynamic lock by also editing the registry key. However, this time, you will do this via the Command Prompt.

📌 Use Cases:

  • This method is excellent for quickly applying the setting across multiple computers.
  • Excellent for IT admins planning to deploy this setting through batch scripts.

📌 Prerequisites:

  • You need to possess administrator privileges.
  • Group Policy settings should not override the registry behavior.

Here’s how to make tweaks to Dynamic lock using Command Prompt:

  1. Open Command Prompt (Administrator).
  2. Run this command if you want to enable Dynamic lock:

reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableGoodbye /t REG_DWORD /d 1 /f

  1. Meanwhile, to disable Dynamic lock, use this code:

reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v EnableGoodbye /t REG_DWORD /d 0 /f

  1. Close the Command Prompt and restart your computer for the changes to take effect.

Method 4: Using PowerShell to enable or disable Dynamic lock

Like in Method 3, this method allows you to edit the Registry to make changes to the Dynamic lock settings. However, this uses PowerShell instead of Command Prompt.

📌 Use Cases:

📌 Prerequisites:

  • You need admin privileges to use an elevated version of PowerShell.
  • Be sure no Group Policy settings override registry behavior.

Here’s how to activate and deactivate Dynamic lock using PowerShell:

  1. Open PowerShell (Administrator).
  2. Enable Dynamic lock using this command:

Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "EnableGoodbye" -Value 1

  1. To disable it, run:

Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" -Name "EnableGoodbye" -Value 0

Method 5: Configure Dynamic lock via Group Policy Editor

You can configure Dynamic lock using the Group Policy Editor for multiple devices, especially in enterprise environments.

📌 Use Cases:

  • This method is excellent for enterprise and school environments that require strong security.
  • Good for domain-joined systems managed through Active Directory.
  • You can use this method if you plan to standardize Dynamic lock across a managed environment.

📌 Prerequisites:

  • Your computer needs to run Windows 11 Pro, Enterprise, and Education editions. This isn’t available on the Home edition.
  • This requires administrator privileges to execute.

Here’s how to use Group Policy to enable or disable Dynamic lock:

  1. Open the Group Policy Editor.
    1. Press Win + R to open the Run dialog.
    2. Type gpedit.msc, and press Enter.
  2. In the left pane, navigate to this path:
    Computer Configuration > Administrative Templates > Windows Components > Windows Hello for Business
  3. Next, in the right-hand pane, double-click Configure dynamic lock factors. 
  4. In its policy settings window, configure Dynamic lock:
    1. Enabled = Dynamic lock is allowed and available to users
    2. Disabled = Dynamic lock is turned off and unavailable (grayed out) in Windows Settings.
    3. Not Configured = The system will follow the default behavior, leaving it to users to manually enable or disable Dynamic lock.

⚠️ Things to look out for

Risks Potential Consequences Reversals
Incorrect Registry path and key Dynamic lock won’t work, or incorrect changes might affect other settings. Double-check the key or correct the entry.
The Bluetooth device is not paired. Dynamic lock will fail to trigger when you step. Pair the smartphone again via Settings > Bluetooth & devices.
Users having trouble with Dynamic lock Users might fail to set it up or utilize it. Be sure to provide tutorials and documentation to users, especially in managed environments, on how to set up and utilize Dynamic lock.

Additional considerations when tweaking Dynamic lock

Turn on Bluetooth

For Dynamic lock to work, the Bluetooth device must be constantly connected and within range when in use. This means both the smartphone and the computer’s Bluetooth must always be on.

It should not replace standard security and authentication methods

Consider Dynamic lock as an additional way to secure your devices. In managed and enterprise environments, emphasize the need for strong passwords and authentication methods (like authenticator apps) to employees.

Test first, deploy later

Before deploying it, ensure you’ve tested how Dynamic lock works in Windows 11. Find out if it is compatible with your organization’s needs and won’t interfere with employee workflows.

Troubleshooting Dynamic lock issues

Dynamic lock isn’t working

Make sure the Bluetooth device is paired and connected to the Windows 11 PC. Also, verify that Bluetooth is enabled on both devices and that the device remains within range.

Registry changes are not applying

Be sure you have navigated to the correct path (HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon) and entered the key (EnableGoodbye) correctly.

Also, make sure the value is set correctly. 1 enables it, and 0 disables it.

Tweaking Group Policy doesn’t work

If making changes via Group Policy does not work, you can fix it by forcing an update via the Command Prompt. Run this command to do so:

gpupdate /force

Enhancing device security with Dynamic lock

Dynamic lock is an excellent feature. It lets you secure various endpoints in a managed environment by adding another layer of protection to computers. By ensuring a device is locked when users step away, sensitive files and proprietary information will be protected. By using the abovementioned methods, IT admins can control this feature and align (or even enhance) organizational and business security requirements.

Related topics:

You might also like

Ready to simplify the hardest parts of IT?

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).