Complete Setup and Deployment Guide
Windows LAPS (Local Administrator Password Solution) is a native Windows feature (available since April 2023 updates) that automatically manages and rotates local administrator passwords, storing them securely in Active Directory or Azure AD.
# Check if LAPS module exists
Import-Module LAPS
# List available LAPS commands
Get-Command -Module LAPS
Update-LapsADSchema
Grant computers the ability to update their own LAPS password in AD:
Set-LapsADComputerSelfPermission -Identity "OU=Workstations,DC=domain,DC=com"
Set-LapsADComputerSelfPermission -Identity "OU=Servers,DC=domain,DC=com"
Replace with your actual OU distinguished names.
# Create group in AD (if not exists)
New-ADGroup -Name "LAPS_Password_Readers" -GroupScope DomainLocal -GroupCategory Security
# Get the group SID (needed for GPO configuration)
Get-ADGroup "LAPS_Password_Readers"
Set-LapsADReadPasswordPermission -Identity "OU=Workstations,DC=domain,DC=com" -AllowedPrincipals "LAPS_Password_Readers"
Set-LapsADReadPasswordPermission -Identity "OU=Servers,DC=domain,DC=com" -AllowedPrincipals "LAPS_Password_Readers"
| Setting | Configuration |
|---|---|
| Enable password backup | Enabled |
| Configure password backup directory | Active Directory (default) |
| Name of administrator account to manage | Specify account name (e.g., "Administrator") |
| Password complexity | Large letters + small letters + numbers + special characters |
| Password length | 20 characters (recommended) |
| Password age (days) | 30 days (recommended) |
Link the GPO to OUs containing:
LAPS-SetLocalAccounts.bat to: \\domain.com\NETLOGON\LAPS\\\domain.com\NETLOGON\LAPS\LAPS-SetLocalAccounts.bat# Force policy update on client
gpupdate /force
# Trigger LAPS password rotation
Invoke-LapsPolicyProcessing
Method 1: AD Users and Computers (GUI)
dsa.mscMethod 2: PowerShell
# View password for specific computer
Get-LapsADPassword -Identity "COMPUTERNAME" -AsPlainText
# View with expiration date
Get-LapsADPassword -Identity "COMPUTERNAME" -AsPlainText |
Select-Object ComputerName, Password, ExpirationTime
Get-LapsADPassword -Identity "DC-NAME" -AsPlainText -IncludeHistory
Solution: On the workstation, run:
gpupdate /force
Invoke-LapsPolicyProcessing
Check Event Viewer: Applications and Services Logs > Microsoft > Windows > LAPS > Operational
Solution: Verify user is member of "LAPS_Password_Readers" group and permissions are set:
Set-LapsADReadPasswordPermission -Identity "OU=Computers,DC=domain,DC=com" -AllowedPrincipals "LAPS_Password_Readers"
Solution: Configure GPO with authorized decryptors SID:
Get-ADGroup "LAPS_Password_Readers"# Verify LAPS installed
Import-Module LAPS
# Update AD schema
Update-LapsADSchema
# Grant computer self-permission
Set-LapsADComputerSelfPermission -Identity "OU=Computers,DC=domain,DC=com"
# Grant read permissions to group
Set-LapsADReadPasswordPermission -Identity "OU=Computers,DC=domain,DC=com" -AllowedPrincipals "GroupName"
# Get password
Get-LapsADPassword "COMPUTERNAME" -AsPlainText
# Force password rotation
Invoke-LapsPolicyProcessing
# Get group SID for GPO
Get-ADGroup "LAPS_Password_Readers"