Open in the explorer

Enable Windows to soft-disconnect a computer from a network

Permettre à Windows une déconnexion logicielle d'un ordinateur d'un réseau

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › Windows Connection Manager FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › Gestionnaire de connexions Windows
Supported on
At least Windows Server 2016, Windows 10 Version 1709 FR: Windows Server 2016, Windows 10 version 1709 ou versions supérieures
ADMX file
WCM.admx
Internal name
WCM/WCM_EnableSoftDisconnect

Explanation

This policy setting determines whether Windows will soft-disconnect a computer from a network.

If this policy setting is enabled or not configured, Windows will soft-disconnect a computer from a network when it determines that the computer should no longer be connected to a network.

If this policy setting is disabled, Windows will disconnect a computer from a network immediately when it determines that the computer should no longer be connected to a network.

When soft disconnect is enabled:
- When Windows decides that the computer should no longer be connected to a network, it waits for traffic to settle on that network. The existing TCP session will continue uninterrupted.
- Windows then checks the traffic level on the network periodically. If the traffic level is above a certain threshold, no further action is taken. The computer stays connected to the network and continues to use it. For example, if the network connection is currently being used to download files from the Internet, the files will continue to be downloaded using that network connection.
- When the network traffic drops below this threshold, the computer will be disconnected from the network. Apps that keep a network connection active even when they're not actively using it (for example, email apps) might lose their connection. If this happens, these apps should re-establish their connection over a different network.

This policy setting depends on other group policy settings. For example, if 'Minimize the number of simultaneous connections to the Internet or a Windows Domain' is disabled, Windows will not disconnect from any networks.

French text from Windows 11 26H2

Ce paramètre de stratégie détermine si Windows va déconnecter par logiciel un ordinateur d’un réseau.

Si vous activez ce paramètre de stratégie ou si vous ne le configurez pas, Windows déconnectera par logiciel un ordinateur d’un réseau lorsqu’il déterminera que l’ordinateur ne doit plus être connecté à un réseau.

Si vous désactivez ce paramètre de stratégie, Windows déconnectera un ordinateur du réseau immédiatement lorsqu’il déterminera que l’ordinateur ne doit plus être connecté à un réseau.

Lorsque la déconnexion logicielle est activée :
– Lorsque Windows décide que l’ordinateur ne doit plus être connecté à un réseau, il attend le trafic pour le régler sur ce réseau. La session TCP existante va continuer sans interruption.
– Windows vérifie régulièrement le niveau de trafic sur le réseau. Si le niveau de trafic est supérieur à un seuil donné, aucune autre action n’est entreprise. L’ordinateur reste connecté au réseau et continue à l’utiliser. Par exemple, si la connexion réseau est actuellement utilisée pour télécharger des fichiers à partir d’Internet, les fichiers continueront à être téléchargés à l’aide de cette connexion réseau.
– Lorsque le trafic réseau chute en dessous de ce seuil, l’ordinateur est déconnecté du réseau. Les applications qui utilisent une connexion réseau active, même lorsqu’elles ne sont pas en cours d’utilisation (par exemple, des applications de messagerie électronique), peuvent perdre leur connexion. Dans ce cas, ces applications doivent rétablir leur connexion via un autre réseau.

Ce paramètre de stratégie dépend d’autres paramètres de stratégie de groupe. Par exemple, si l’opération de réduction du nombre de connexions simultanées à Internet ou à un domaine Windows est désactivée, Windows ne se connecte à aucun réseau.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy
Value name
fSoftDisconnectConnections
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: WCM/WCM_EnableSoftDisconnect
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'fSoftDisconnectConnections' -Value 1 -Type DWord

Disable

# Disable: WCM/WCM_EnableSoftDisconnect
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'fSoftDisconnectConnections' -Value 0 -Type DWord

Revert to "Not configured"

# Revert to "Not configured": WCM/WCM_EnableSoftDisconnect
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
Remove-ItemProperty -Path $k -Name 'fSoftDisconnectConnections' -ErrorAction SilentlyContinue

Availability

Windows 10

✓ 22H2✓ 21H2✓ 21H1✓ 20H2✓ 2004✓ 1909✓ 1903changed✓ 1809— 1803— 1709— 1703— 1607— 1511— 1507

Windows Server