Configure automatic account management: registry value AutomaticAccountManagementEnabled and 4 moreComputerHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS
- Policy ID
- LAPS_AutomaticAccountManagementPolicy
- Scope
- Computer Configuration
- Supported on
- At least Microsoft Windows 10 or later
- Source
- Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
- Category
- System › LAPS
Registry
AutomaticAccountManagementEnabled
REG_DWORDComputer- Enabled value
- 1
- Disabled value
- 0
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS] ; Options (use only one) ; Enabled "AutomaticAccountManagementEnabled"=dword:00000001 ; Disabled "AutomaticAccountManagementEnabled"=dword:00000000
CMD
:: Options (use only one) :: Enabled reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementEnabled" /t REG_DWORD /d 1 /f :: Disabled reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementEnabled" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Force | Out-Null # Options (use only one) # Enabled New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementEnabled' -PropertyType DWord -Value 1 -Force | Out-Null # Disabled New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementEnabled' -PropertyType DWord -Value 0 -Force | Out-Null
AutomaticAccountManagementTarget
REG_DWORDComputer- Enabled value
- Depends on the option value
- Element
- Specify the target account to manage:
| Item | Stored value |
|---|---|
| Manage the built-in admin account | 0 |
| Manage a custom admin account | 1 |
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS] ; Options (use only one) ; Manage the built-in admin account "AutomaticAccountManagementTarget"=dword:00000000 ; Manage a custom admin account "AutomaticAccountManagementTarget"=dword:00000001
CMD
:: Options (use only one) :: Manage the built-in admin account reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementTarget" /t REG_DWORD /d 0 /f :: Manage a custom admin account reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementTarget" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Force | Out-Null # Options (use only one) # Manage the built-in admin account New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementTarget' -PropertyType DWord -Value 0 -Force | Out-Null # Manage a custom admin account New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementTarget' -PropertyType DWord -Value 1 -Force | Out-Null
AutomaticAccountManagementNameOrPrefix
REG_SZComputer- Enabled value
- Depends on the option value
- Element
- Automatic account name (or name prefix):
- Value type
- REG_SZ
- Maximum length
- 20
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS] ; Value names and types follow the ADMX. Replace <enter value> below with your own data "AutomaticAccountManagementNameOrPrefix"="<enter value>"
CMD
:: Value names and types follow the ADMX. Replace <enter value> below with your own data reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementNameOrPrefix" /t REG_SZ /d "<enter value>" /f
PowerShell
# Value names and types follow the ADMX. Replace <enter value> below with your own data New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Force | Out-Null New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementNameOrPrefix' -PropertyType String -Value '<enter value>' -Force | Out-Null
AutomaticAccountManagementEnableAccount
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Enable the managed account
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS] ; Options (use only one) ; Checked "AutomaticAccountManagementEnableAccount"=dword:00000001 ; Unchecked "AutomaticAccountManagementEnableAccount"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementEnableAccount" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementEnableAccount" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementEnableAccount' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementEnableAccount' -PropertyType DWord -Value 0 -Force | Out-Null
AutomaticAccountManagementRandomizeName
REG_DWORDComputer- Checked
- 1
- Unchecked
- 0
- Element
- Randomize the name of the managed account
- Value type
- REG_DWORD
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS] ; Options (use only one) ; Checked "AutomaticAccountManagementRandomizeName"=dword:00000001 ; Unchecked "AutomaticAccountManagementRandomizeName"=dword:00000000
CMD
:: Options (use only one) :: Checked reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementRandomizeName" /t REG_DWORD /d 1 /f :: Unchecked reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS" /v "AutomaticAccountManagementRandomizeName" /t REG_DWORD /d 0 /f
PowerShell
# Common: create the key New-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Force | Out-Null # Options (use only one) # Checked New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementRandomizeName' -PropertyType DWord -Value 1 -Force | Out-Null # Unchecked New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\LAPS' -Name 'AutomaticAccountManagementRandomizeName' -PropertyType DWord -Value 0 -Force | Out-Null