Configure password backup directory
Configurer le répertoire de sauvegarde de mot de passe
Explanation
Use this setting to configure which directory the local admin account password is backed up to.
The allowable settings are:
0=Disabled (password will not be backed up)
1=Backup the password to Azure Active Directory
2=Backup the password to Active Directory
If not specified, this setting will default to 0 (Disabled).
If this setting is configured to 1, and the managed device is not joined to Azure Active Directory, the local administrator password will not be managed.
If this setting is configured to 2, and the managed device is not joined to Active Directory, the local administrator password will not be managed.
If this setting is disabled or not configured, the local administrator password is not managed.
See https://go.microsoft.com/fwlink/?linkid=2188435 for more information.
Utilisez ce paramètre pour configurer le répertoire dans lequel le mot de passe du compte d’administrateur local est sauvegardé.
Les paramètres autorisés sont :
0=Désactivé (le mot de passe ne sera pas sauvegardé)
1=Sauvegarder le mot de passe dans Azure Active Directory
2=Sauvegarder le mot de passe pour Active Directory
Si ce paramètre n’est pas spécifié, la valeur par défaut est 0 (Désactivé).
Si ce paramètre est configuré sur 1 et que l’appareil géré n’est pas joint à Azure Active Directory, le mot de passe de l’administrateur local n’est pas géré.
Si ce paramètre est configuré sur 2 et que l’appareil géré n’est pas joint à Active Directory, le mot de passe de l’administrateur local n’est pas géré.
Si ce paramètre est désactivé ou s’il n’est pas configuré, le mot de passe de l’administrateur local n’est pas géré.
Pour plus d’informations, consultez https://go.microsoft.com/fwlink/?linkid=2188435.
Use cases
This is the setting that turns Windows LAPS on: 1 backs up the local administrator password to Microsoft Entra ID, 2 to Active Directory; the default is 0 (disabled) and while it stays there all other settings are ignored. Each machine thus gets a unique, rotated local admin password, which blocks lateral movement through password reuse.
The two targets are mutually exclusive (no simultaneous backup), and LAPS.admx must be copied manually to the GPO central store.
Microsoft sources: Configure policy settings for Windows LAPS · Windows LAPS overview
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: LAPS/LAPS_BackupDirectory
$k = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Backup directory
# Possible options:
# Disabled = 0
# Azure Active Directory = 1
# Active Directory = 2
Set-ItemProperty -Path $k -Name 'BackupDirectory' -Value 1 -Type DWordDisable
# Disable: LAPS/LAPS_BackupDirectory
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": LAPS/LAPS_BackupDirectory
$k = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS'
Remove-ItemProperty -Path $k -Name 'BackupDirectory' -ErrorAction SilentlyContinueOptions (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Backup directoryRépertoire de sauvegardeLAPS_BackupDirectory | Drop-down listenum | BackupDirectory | REG_DWORD | Default choice (UI): #1
|