Do not allow smart card device redirection
Ne pas autoriser la redirection du périphérique lecteur de cartes à puce
Explanation
This policy setting allows you to control the redirection of smart card devices in a Remote Desktop Services session.
If you enable this policy setting, Remote Desktop Services users cannot use a smart card to log on to a Remote Desktop Services session.
If you disable or do not configure this policy setting, smart card device redirection is allowed. By default, Remote Desktop Services automatically redirects smart card devices on connection.
Note: The client computer must be running at least Microsoft Windows 2000 Server or at least Microsoft Windows XP Professional and the target server must be joined to a domain.
Ce paramètre de stratégie vous permet de contrôler la redirection des périphériques à carte à puce dans une session de services Bureau à distance.
Si vous activez ce paramètre de stratégie, les utilisateurs de services Bureau à distance ne peuvent pas utiliser de carte à puce pour se connecter à une session de services Bureau à distance.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, la redirection des périphériques à carte à puce est autorisée. Par défaut, les services Bureau à distance redirigent automatiquement les périphériques à carte à puce dès la connexion.
Remarque : l’ordinateur client doit exécuter au minimum Microsoft Windows 2000 Server ou Microsoft Windows XP Professionnel et le serveur cible doit être rattaché à un domaine.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services- Value name
fEnableSmartCard
| 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_SMART_CARD
$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 'fEnableSmartCard' -Value 0 -Type DWordDisable
# Disable: TerminalServer/TS_SMART_CARD
$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 'fEnableSmartCard' -Value 1 -Type DWordRevert to "Not configured"
# Revert to "Not configured": TerminalServer/TS_SMART_CARD
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'fEnableSmartCard' -ErrorAction SilentlyContinue