1. Home
  2. Lab library
  3. IB-AD-SEC

Deploy Windows LAPS for Local Administrator Passwords

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…

Level Intermediate Time about 90 minutes Updated
Quick answer

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.

Windows LAPS deployment in Active Directory01Extend schemaUpdate-LapsADSchema02Set permissionsDevice self write, helpdesk read03Configure policyGroup Policy for LAPS04Retrieve passwordGet-LapsADPassword05Rotate after useReset-LapsPassword
Windows LAPS deployment in Active Directory

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.
Note

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

  1. Let computers in the OU update their own password:
    Set-LapsADComputerSelfPermission -Identity "OU=LAPS-Lab,DC=corp,DC=example"
  2. 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"
  3. 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

  1. If the LAPS settings are missing from the editor, copy LAPS.admx and its language file from C:\Windows\PolicyDefinitions on an updated machine into your central store.
  2. Create a GPO named LAPS-Lab-Policy and link it to the OU.
  3. Edit it and open Computer Configuration, Policies, Administrative Templates, System, LAPS.
SettingLab value
Configure password backup directoryEnabled, Active Directory
Password SettingsEnabled. Large letters, small letters, numbers and specials. Length 20. Age 30 days
Enable password encryptionEnabled, if your functional level supports it
Configure authorized password decryptorsCORP\GRP-LAPS-Readers
Post-authentication actionsEnabled. Grace period 8 hours. Reset the password and log off the managed account
Name of administrator account to manageLeave 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

  1. Sign in to the client with the local account and the retrieved password.
  2. Force a rotation from the directory side, which takes effect at the next policy cycle:
    Set-LapsADPasswordExpirationTime -Identity "PC01"
    or rotate at once on the device itself:
    Reset-LapsPassword
  3. Retrieve the password again and confirm it has changed.
Warning

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.

Verify

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-LapsADExtendedRights after 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.

Built and published by Muhammad Rizwan Afzal for Identity Bytes. Run every lab against a disposable test tenant, never production.