Do not set default client printer to be default printer in a session
Ne pas définir l'imprimante par défaut du client comme imprimante par défaut d'une session
Explanation
This policy setting allows you to specify whether the client default printer is automatically set as the default printer in a session on an RD Session Host server.
By default, Remote Desktop Services automatically designates the client default printer as the default printer in a session on an RD Session Host server. You can use this policy setting to override this behavior.
If you enable this policy setting, the default printer is the printer specified on the remote computer.
If you disable this policy setting, the RD Session Host server automatically maps the client default printer and sets it as the default printer upon connection.
If you do not configure this policy setting, the default printer is not specified at the Group Policy level.
Ce paramètre de stratégie vous permet de spécifier si l’imprimante par défaut du client est définie automatiquement en tant qu’imprimante par défaut d’une session sur un serveur Hôte de session Bureau à distance.
Par défaut, les services Bureau à distance désignent automatiquement l’imprimante par défaut du client comme imprimante par défaut d’une session sur un serveur Hôte de session Bureau à distance. Vous pouvez utiliser ce paramètre de stratégie pour modifier ce comportement.
Si vous activez ce paramètre de stratégie, l’imprimante par défaut est l’imprimante spécifiée sur l’ordinateur distant.
Si vous désactivez ce paramètre de stratégie, le serveur Hôte de session Bureau à distance mappe automatiquement l’imprimante par défaut du client et la définit comme imprimante par défaut au moment de la connexion.
Si vous ne configurez pas ce paramètre de stratégie, l’imprimante par défaut n’est pas spécifiée au niveau de la stratégie de groupe.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services- Value name
fForceClientLptDef
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 0 |
| Disabled | REG_DWORD = 1 |
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_DEFAULT_M
$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 'fForceClientLptDef' -Value 0 -Type DWordDisable
# Disable: TerminalServer/TS_CLIENT_DEFAULT_M
$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 'fForceClientLptDef' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": TerminalServer/TS_CLIENT_DEFAULT_M
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'fForceClientLptDef' -ErrorAction SilentlyContinue