Active Directory Series

🔐 A Top 1% Hands-On for Automatically Rotating Local Administrator Passwords With Windows LAPS — gMSA Solved the Service Account Problem, LAPS Solves the Local Administrator Account Problem

Introduction

This article is part of the Top 1% Series Complete Article Guide, and article 31.1 in the ActiveDirectory Series.

Prerequisite Knowledge

Getting the Big Picture

Many organizations set the exact same password on the local administrator account of every single device. This practice carries a fatal risk. The moment one device’s local admin password leaks through some means, an attacker can use that password’s hash (pass-the-hash) to log in as that account on every other device in the organization.

Windows LAPS (Local Administrator Password Solution) automatically generates a completely different, random password for each device, and stores it encrypted as an attribute on the device object in AD. This means that even if one device’s password leaks, it can’t be used for lateral movement to any other device.

graph TB
    GPO["Windows LAPS GPO settings<br/>(rotation interval, password complexity)"] --> PC1["Device A<br/>Local admin password: Xy7#..."]
    GPO --> PC2["Device B<br/>Local admin password: Qm2!..."]
    GPO --> PC3["Device C<br/>Local admin password: Zp9&..."]
    PC1 -->|"Stored encrypted"| AD["Each AD computer object's<br/>msLAPS-EncryptedPassword attribute"]
    PC2 -->|"Stored encrypted"| AD
    PC3 -->|"Stored encrypted"| AD
    AD -->|"Delegate read access"| Helpdesk["Help desk group"]

Hands-On: Build Windows LAPS and Delegate Password Read Access

Step 1: Confirm the Schema Extension

Windows LAPS needs to add new attributes (such as msLAPS-EncryptedPassword) to AD’s schema, for storing the encrypted password. Depending on your forest functional level and OS versions, run the Update-LapsADSchema cmdlet in advance to apply the schema extension.

Step 2: Enable Windows LAPS via GPO

Link a new GPO to the OU the target computers belong to, and configure the policies under Computer Configuration → Administrative Templates → LAPS. Specify the password’s complexity, length, and rotation interval (30 days by default), and select “Active Directory” as the backup destination.

Step 3: Confirm the Behavior on the Device

On a device the GPO has applied to, a background task wakes up roughly every hour and checks the policy’s state. When it’s time to rotate, a new random password is generated, set on the local administrator account, and then written to AD in encrypted form.

The Decisive Difference From Legacy Microsoft LAPS

The older “Microsoft LAPS” (a separately distributed tool) actually stored the password in AD’s ms-Mcs-AdmPwd attribute as plaintext, unencrypted. While it did restrict read access through an access control list (ACL), this carried a structural risk: if an account with any read permission on AD was compromised, the password itself could be read straight out, with no encryption at all. Windows LAPS, by contrast — built natively into Windows — encrypts the password using DPAPI-NG before storing it in AD, and only principals explicitly granted permission can decrypt it. Legacy LAPS and Windows LAPS can’t manage the same account on the same device at the same time.

Step 4: Delegate Password Read Access to Only the Help Desk Group

By default, only highly privileged groups like Domain Admins can decrypt and read the password. Using the same approach as OU delegation of control, use the Set-LapsADReadPasswordPermission cmdlet to delegate read access to the msLAPS-EncryptedPassword attribute, on the target OU, to only the help desk group. This lets help desk staff retrieve just the local administrator password for the devices they’re responsible for, using the Get-LapsADPassword cmdlet, without holding Domain Admins privileges at all.

What a Pro Sees Here (Top 1% Understanding)

gMSA and LAPS Are Two Different Applications of the Same Idea: Automatic Password Rotation

gMSA was a mechanism where AD automatically rotates the password of a domain account a service uses. Windows LAPS is a mechanism that automatically rotates the local administrator account’s password each device holds, in exactly the same way. The two are nothing more than two different applications of the same design philosophy: driving the number of passwords a human manages manually as close to zero as possible. Making sure the answer to “who’s rotating this account’s password, when, and how” is anything other than “an IT staffer, manually” is the consistent direction of improvement across this entire field.

Common Misconceptions and Pitfalls

Troubleshooting Perspective

  1. You applied the GPO, but the password never gets written to AD: Check whether the schema extension (Update-LapsADSchema) was run beforehand.
  2. Help desk staff can’t retrieve the password with Get-LapsADPassword: Check whether Set-LapsADReadPasswordPermission delegation was correctly configured for the target OU.
  3. You migrated from legacy Microsoft LAPS, but the password is being managed twice: Check whether the legacy LAPS client agent is still installed on the device.

Summary

Takeaways to Apply Today

  1. If you find a practice of setting the same local administrator password across every device, consider deploying Windows LAPS.
  2. Make it a habit to view gMSA and LAPS along the same axis: who is manually managing this password?

References

Comments

Feel free to leave thoughts, questions, or corrections below (sign in with a GitHub account to comment or react).