Microsoft LAPS (Local Administrator Password Solution) Guide
Published: February 23, 2023 | Last Modified: May 13, 2025
Tags: passwords security windows active directory password management automation local administrator domain security
Categories: PowerShell Security Windows
Microsoft LAPS (Local Administrator Password Solution) is a tool designed to securely manage local administrator account passwords on Windows domain-joined computers. It automates password generation and rotation, and stores passwords in a secure manner, providing greater control and security over local accounts.
Get the local admin password for 1 computer
from Active Directory PowerShell:
Get-AdmPwdPassword -ComputerName <computername>
Get the OU and DC info for a computer
from Active Directory PowerShell:
Get-ADComputer -Identity <computername> -Properties DistinguishedName,DNSHostName
Get the local admin password for all computers
from Active Directory PowerShell:
Get-ADComputer -Filter * -SearchBase “OU=,DC=,DC=,DC=” | Get-AdmPwdPassword -ComputerName {$_.Name}