Microsoft's Local Administrator Password Solution (LAPS) is now built into modern versions of Windows and can be configured to store local admin passwords securely in Microsoft Entra ID (formerly Azure AD). If you're managing Azure AD-joined devices without Intune or on-prem Active Directory, you can still fully automate LAPS deployment using LGPO.exe.
Before deploying LAPS to any devices, make sure it's turned on in your tenant:
On one machine, open gpedit.msc
and configure the LAPS policy. Note: Exporting with LGPO.exe
will include all local Group Policy settings on that machine. It’s highly recommended to create and manage a clean “baseline” device for this purpose. If you're unfamiliar with how Group Policy works or what else may be included, proceed with caution.
Open Command Prompt as Administrator and run:
LGPO.exe /b C:\Tools\LAPS-GPO-Backup
This exports all local GPOs (including your LAPS config) into LAPS-GPO-Backup
.
Create a folder with the following structure:
LAPSDeploy\
├── LGPO.exe
├── LAPS-GPO-Backup\
└── deploy-laps.cmd
deploy-laps.cmd contents:
@echo off
cd /d %~dp0
LGPO.exe /g "%~dp0LAPS-GPO-Backup"
shutdown /r /t 5 /f
You can run this deployment process using any remote admin tool that gives you system-level access — whether that’s:
From MeshCentral:
LAPSDeploy.zip
to the target machinepowershell -Command "Expand-Archive -Path C:\Users\Public\Desktop\LAPSDeploy.zip -DestinationPath C:\LAPSDeploy"
C:\LAPSDeploy\deploy-laps.cmd
After the system reboots, open a remote PowerShell session or reconnect via terminal and run to test the password rotation:
Reset-LapsPassword -Verbose
If this command fails with an error like E_INVALIDDOMAINSTATE
, LAPS is not properly configured or hasn’t been initialized at boot.
To retrieve the local admin password, go to:
Microsoft Entra Admin Center > Devices > [Device Name] > Local Administrator Password Recovery
Download: LAPSDeploy.zip (includes LGPO.exe, LAPS GPO backup, and deployment script)
If you’re an MSP looking to standardize LAPS securely without Intune or domain overhead, this process is light, repeatable, and powerful. Let us know if you’d like a custom version of the kit tailored to your environment.