$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