Prohibit connection to non-domain networks when connected to domain authenticated network
Interdire la connexion à des réseaux sans domaine en cas de connexion à un réseau authentifié par son domaine
Explanation
This policy setting prevents computers from connecting to both a domain based network and a non-domain based network at the same time.
If this policy setting is enabled, the computer responds to automatic and manual network connection attempts based on the following circumstances:
Automatic connection attempts
- When the computer is already connected to a domain based network, all automatic connection attempts to non-domain networks are blocked.
- When the computer is already connected to a non-domain based network, automatic connection attempts to domain based networks are blocked.
Manual connection attempts
- When the computer is already connected to either a non-domain based network or a domain based network over media other than Ethernet, and a user attempts to create a manual connection to an additional network in violation of this policy setting, the existing network connection is disconnected and the manual connection is allowed.
- When the computer is already connected to either a non-domain based network or a domain based network over Ethernet, and a user attempts to create a manual connection to an additional network in violation of this policy setting, the existing Ethernet connection is maintained and the manual connection attempt is blocked.
If this policy setting is not configured or is disabled, computers are allowed to connect simultaneously to both domain and non-domain networks.
Ce paramètre de stratégie empêche les ordinateurs de se connecter à un réseau basé sur un domaine ou à un réseau qui n'est pas basé sur un domaine en même temps.
Si ce paramètre de stratégie est activé, l'ordinateur répond aux tentatives de connexion réseau automatiques et manuelles en fonction des circonstances suivantes :
Tentatives de connexion automatique
-Lorsque l'ordinateur est déjà connecté à un réseau basé sur un domaine, toutes les tentatives de connexion automatique aux réseaux qui n'appartiennent pas au domaine sont bloquées.
-Lorsque l'ordinateur est déjà connecté à un réseau qui n'est pas basé sur un domaine, les tentatives de connexion automatique aux réseaux basés sur un domaine sont bloquées.
Tentatives de connexion manuelle
-Lorsque l'ordinateur est déjà connecté à un réseau qui n'est pas basé sur un domaine ou à un réseau basé sur un domaine via des médias autres que Ethernet, et qu'un utilisateur tente de créer une connexion manuelle vers un réseau supplémentaire en violation de ce paramètre de stratégie, la connexion réseau existante est déconnectée et la connexion manuelle est autorisée.
-Lorsque l'ordinateur est déjà connecté à un réseau qui n'est pas basé sur un domaine ou à un réseau basé sur un domaine via Ethernet, et qu'un utilisateur tente de créer une connexion manuelle à un réseau supplémentaire en violation de ce paramètre de stratégie, la connexion Ethernet existante est la connexion est maintenue et la tentative de connexion manuelle est bloquée.
Si vous désactivez ce paramètre de stratégie ou ne le configurez pas, les ordinateurs sont autorisés à se connecter simultanément aux réseaux n'appartenant pas à un domaine.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy- Value name
fBlockNonDomain
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_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_BlockNonDomain
$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 'fBlockNonDomain' -Value 1 -Type DWordDisable
# Disable: WCM/WCM_BlockNonDomain
$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 'fBlockNonDomain' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WCM/WCM_BlockNonDomain
$k = 'HKLM:\Software\Policies\Microsoft\Windows\WcmSvc\GroupPolicy'
Remove-ItemProperty -Path $k -Name 'fBlockNonDomain' -ErrorAction SilentlyContinue