0 0

Enable Local Admin Password Mgmt

Ensure 'Enable Local Admin Password Management' is set to 'Enabled'.
$RegistryPath = 'HKEY_LOCAL_MACHINE:SOFTWARE\Policies\Microsoft Services\AdmPwd' $Name = 'AdmPwdEnabled' $Value = '1'
If (-NOT (Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null }
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force