Do not allow passwords to be saved
Ne pas autoriser l'enregistrement des mots de passe
Explanation
Controls whether passwords can be saved on this computer from Remote Desktop Connection.
If you enable this setting the password saving checkbox in Remote Desktop Connection will be disabled and users will no longer be able to save passwords. When a user opens an RDP file using Remote Desktop Connection and saves his settings, any password that previously existed in the RDP file will be deleted.
If you disable this setting or leave it not configured, the user will be able to save passwords using Remote Desktop Connection.
Contrôle si les mots de passe peuvent être enregistrés sur cet ordinateur à partir de Connexion Bureau à distance.
Si vous activez ce paramètre, la case à cocher d'enregistrement du mot de passe est désactivée dans Connexion Bureau à distance et les utilisateurs ne peuvent plus enregistrer les mots de passe. Quand un utilisateur ouvre un fichier RDP à l'aide de Connexion Bureau à distance et enregistre ses paramètres, tout mot de passe existant antérieurement dans le fichier RDP est supprimé.
Si vous désactivez ce paramètre ou si vous ne le configurez pas, l'utilisateur peut enregistrer des mots de passe à l'aide de Connexion Bureau à distance.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services- Value name
DisablePasswordSaving
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Enable
# Enable: TerminalServer/TS_CLIENT_DISABLE_PASSWORD_SAVING_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisablePasswordSaving' -Value 1 -Type DWordDisable
# Disable: TerminalServer/TS_CLIENT_DISABLE_PASSWORD_SAVING_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DisablePasswordSaving' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": TerminalServer/TS_CLIENT_DISABLE_PASSWORD_SAVING_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'DisablePasswordSaving' -ErrorAction SilentlyContinue