Ensure LAPS AdmPwd GPO Extension / CSE is installed.
$RegistryPath = 'HKEY_LOCAL_MACHINE:SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\GPExtensions{D76B9641-3288-4f75-942D-087DE603E3EA}' $Name = 'DllName' $Value = 'C:\Program Files\LAPS\CSE\AdmPwd.dll'
If (-NOT (Test-Path $RegistryPath)) { New-Item -Path $RegistryPath -Force | Out-Null }
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType String -Force