Open in the explorer

Restrict Remote Desktop Services users to a single Remote Desktop Services session

N’autoriser qu’une session de services Bureau à distance par utilisateur

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Windows Components › Remote Desktop Services › Remote Desktop Session Host › Connections FR: Configuration ordinateur › Stratégies › Modèles d'administration › Composants Windows › Services Bureau à distance › Hôte de la session Bureau à distance › Connexions
Supported on
At least Windows Server 2003 FR: Au minimum Windows Server 2003
ADMX file
TerminalServer.admx
Internal name
TerminalServer/TS_SINGLE_SESSION

Explanation

This policy setting allows you to restrict users to a single Remote Desktop Services session.

If you enable this policy setting, users who log on remotely by using Remote Desktop Services will be restricted to a single session (either active or disconnected) on that server. If the user leaves the session in a disconnected state, the user automatically reconnects to that session at the next logon.

If you disable this policy setting, users are allowed to make unlimited simultaneous remote connections by using Remote Desktop Services.

If you do not configure this policy setting, this policy setting is not specified at the Group Policy level.

French text from Windows 11 26H2

Ce paramètre de stratégie vous permet de limiter les utilisateurs à une seule session de services Bureau à distance.

Si vous activez ce paramètre de stratégie, les utilisateurs qui ouvrent une session à distance via les services Bureau à distance sont limités à une seule session (active ou déconnectée) sur ce serveur. Si l’utilisateur quitte la session dans un état déconnecté, il se reconnecte automatiquement à cette session lors de la prochaine ouverture de session.

Si vous désactivez ce paramètre de stratégie, les utilisateurs sont autorisés à établir un nombre illimité de connexions simultanées à distance à l’aide des services Bureau à distance.

Si vous ne configurez pas ce paramètre de stratégie, il n’est pas spécifié au niveau de la stratégie de groupe.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services
Value name
fSingleSessionPerUser
StateValue written
EnabledREG_DWORD = 1
DisabledREG_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_SINGLE_SESSION
$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 'fSingleSessionPerUser' -Value 1 -Type DWord

Disable

# Disable: TerminalServer/TS_SINGLE_SESSION
$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 'fSingleSessionPerUser' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": TerminalServer/TS_SINGLE_SESSION
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services'
Remove-ItemProperty -Path $k -Name 'fSingleSessionPerUser' -ErrorAction SilentlyContinue

Availability