Minimum password length audit: registry value MinimumPasswordLengthAuditComputerHKLM\System\CurrentControlSet\Control\SAM

Category
Security Settings › Account Policies › Password Policy
Scope
Computer Configuration
Source
Windows 11 (version 26H2 · 26300.9457)

Registry

MinimumPasswordLengthAudit

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Minimum password length audit
Value type
REG_DWORD
Minimum value
1
Maximum value
128
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SAM]
"MinimumPasswordLengthAudit"=dword:<enter value>
CMD
reg add "HKLM\System\CurrentControlSet\Control\SAM" /v "MinimumPasswordLengthAudit" /t REG_DWORD /d "<enter value>" /f
PowerShell
New-Item -Path 'HKLM:\System\CurrentControlSet\Control\SAM' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\SAM' -Name 'MinimumPasswordLengthAudit' -PropertyType DWord -Value '<enter value>' -Force | Out-Null