3 0

Do not allow passwords to be saved

Ensure 'Do not allow passwords to be saved' is set to 'Enabled'.
$RegistryPath = 'HKEY_LOCAL_MACHINE:SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services' $Name = 'DisablePasswordSaving' $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