Open in the explorer

Automatic reconnection

Reconnexion automatique

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 operating systems or Windows XP Professional FR: Au minimum Windows Server 2003 ou Windows XP Professionnel
ADMX file
TerminalServer.admx
Internal name
TerminalServer/TS_AUTO_RECONNECT

Explanation

Specifies whether to allow Remote Desktop Connection clients to automatically reconnect to sessions on an RD Session Host server if their network link is temporarily lost. By default, a maximum of twenty reconnection attempts are made at five second intervals.

If the status is set to Enabled, automatic reconnection is attempted for all clients running Remote Desktop Connection whenever their network connection is lost.

If the status is set to Disabled, automatic reconnection of clients is prohibited.

If the status is set to Not Configured, automatic reconnection is not specified at the Group Policy level. However, users can configure automatic reconnection using the "Reconnect if connection is dropped" checkbox on the Experience tab in Remote Desktop Connection.

French text from Windows 11 26H2

Indique si les clients Connexion Bureau à distance doivent être autorisés à se reconnecter automatiquement aux sessions d'un serveur Hôte de la session Bureau à distance si leur liaison réseau est temporairement perdue. Par défaut, vingt tentatives de reconnexion au maximum sont effectuées à des intervalles de cinq secondes.

Si vous activez ce paramètre, la reconnexion automatique est tentée pour tous les clients qui exécutent Connexion Bureau à distance chaque fois que leur connexion réseau est perdue.

Si vous désactivez ce paramètre, la reconnexion automatique des clients est interdite.

Si vous ne configurez pas ce paramètre, la reconnexion automatique n'est pas spécifiée au niveau de la stratégie de groupe. Toutefois, les utilisateurs peuvent configurer la reconnexion automatique à l'aide de la case à cocher Reconnecter si la connexion est abandonnée sous l'onglet Avancé de Connexion Bureau à distance.

Registry

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

Disable

# Disable: TerminalServer/TS_AUTO_RECONNECT
$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 'fDisableAutoReconnect' -Value 1 -Type DWord

Revert to "Not configured"

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

Availability