When every computer shares one local administrator password, a single compromised machine opens all of them. Windows LAPS gives each device a unique, random local admin password, stores it in Active Directory and rotates it on a schedule. In this lab you extend the schema, set who may read passwords, configure policy and test retrieval and rotation.
Key takeaways
- A shared local admin password lets an attacker move from one machine to all of them
- Windows LAPS is built into supported Windows versions, with no separate agent to install
- Limit who can read passwords to a named group, and check for extended rights
- Rotate the password after every use so a retrieved password has a short life
Why this lab matters
Pass the hash and similar lateral movement techniques depend on the same local administrator credential working on many machines. Unique passwords per device break that chain. Windows LAPS (Local Administrator Password Solution) is Microsoft's built-in answer, and it replaces the older separately installed product often called legacy LAPS.
What you need
- A lab domain with a domain controller and at least one domain-joined client. Use Windows 11, or Windows 10, Server 2019 or Server 2022 with the April 2023 update or later.
- Schema Admin rights for Step 1 and Domain Admin rights for the rest.
- An OU for the test client, for example
OU=LAPS-Lab,DC=corp,DC=example.
Encrypting the stored password needs domain functional level 2016 or later. On older levels LAPS still works and stores the password in a confidential attribute protected by permissions.
Step 1: Extend the schema
On the domain controller, in an elevated PowerShell session:
Import-Module LAPS
Update-LapsADSchema -Verbose
This adds attributes such as msLAPS-Password, msLAPS-EncryptedPassword and msLAPS-PasswordExpirationTime to computer objects. A schema change cannot be undone, which is one more reason to practise in a lab.
Step 2: Set permissions
- Let computers in the OU update their own password:
Set-LapsADComputerSelfPermission -Identity "OU=LAPS-Lab,DC=corp,DC=example" - See who can already read confidential attributes in the OU. Anyone unexpected here needs fixing before you go further:
Find-LapsADExtendedRights -Identity "OU=LAPS-Lab,DC=corp,DC=example" - Create a reader group and grant it read and reset rights:
New-ADGroup -Name "GRP-LAPS-Readers" -GroupScope Global -GroupCategory Security Set-LapsADReadPasswordPermission -Identity "OU=LAPS-Lab,DC=corp,DC=example" -AllowedPrincipals "CORP\GRP-LAPS-Readers" Set-LapsADResetPasswordPermission -Identity "OU=LAPS-Lab,DC=corp,DC=example" -AllowedPrincipals "CORP\GRP-LAPS-Readers"
Step 3: Configure Group Policy
- If the LAPS settings are missing from the editor, copy
LAPS.admxand its language file fromC:\Windows\PolicyDefinitionson an updated machine into your central store. - Create a GPO named
LAPS-Lab-Policyand link it to the OU. - Edit it and open Computer Configuration, Policies, Administrative Templates, System, LAPS.
| Setting | Lab value |
|---|---|
| Configure password backup directory | Enabled, Active Directory |
| Password Settings | Enabled. Large letters, small letters, numbers and specials. Length 20. Age 30 days |
| Enable password encryption | Enabled, if your functional level supports it |
| Configure authorized password decryptors | CORP\GRP-LAPS-Readers |
| Post-authentication actions | Enabled. Grace period 8 hours. Reset the password and log off the managed account |
| Name of administrator account to manage | Leave unset to manage the built-in Administrator, or name your custom account |
Step 4: Apply and check the client
gpupdate /force
Invoke-LapsPolicyProcessing
Open Event Viewer on the client and go to Applications and Services Logs, Microsoft, Windows, LAPS, Operational. Event ID 10018 confirms the password was updated in Active Directory. Event ID 10004 marks a processing cycle that finished successfully.
Step 5: Retrieve the password
Get-LapsADPassword -Identity "PC01" -AsPlainText
The output shows the account name, the password and the expiry time. You can also open the computer object in Active Directory Users and Computers and use the LAPS tab. Now sign in as a normal domain user who is not in the reader group and run the same command. The password field should come back empty.
Step 6: Use it, then rotate it
- Sign in to the client with the local account and the retrieved password.
- Force a rotation from the directory side, which takes effect at the next policy cycle:
or rotate at once on the device itself:Set-LapsADPasswordExpirationTime -Identity "PC01"Reset-LapsPassword - Retrieve the password again and confirm it has changed.
Do not run legacy LAPS and Windows LAPS against the same account on the same machine. Plan the migration so each device is managed by one of them.
You are finished when a reader can retrieve the password, a normal user cannot, event 10018 is logged and the password is different after rotation.
Evidence to keep
- The output of
Find-LapsADExtendedRightsafter clean up. - A GPO settings report for the policy.
- Two retrievals showing different passwords and expiry times.
Frequently asked questions
What is Windows LAPS?
Windows LAPS is a built-in Windows feature that sets a unique, random password for a local administrator account on each device, backs it up to Active Directory or Microsoft Entra ID and rotates it automatically.
Is Windows LAPS different from legacy Microsoft LAPS?
Yes. Legacy LAPS was a separate download with its own client extension and schema. Windows LAPS is included in supported Windows versions, adds password encryption, password history and Entra ID backup, and uses new PowerShell commands.
Who can read LAPS passwords in Active Directory?
Only principals granted read permission on the OU, for example with Set-LapsADReadPasswordPermission, plus anyone who already holds extended rights there. Find-LapsADExtendedRights lists them so you can remove unexpected access.
How often should LAPS rotate the local admin password?
A 30 day maximum age is a common baseline. Also configure post-authentication actions so the password is reset a few hours after it has been used.