Windows Defender Firewall: Do not allow exceptions
Pare-feu Windows Defender : n'autoriser aucune exception
Explanation
Specifies that Windows Defender Firewall blocks all unsolicited incoming messages. This policy setting overrides all other Windows Defender Firewall policy settings that allow such messages.
If you enable this policy setting, in the Windows Defender Firewall component of Control Panel, the "Block all incoming connections" check box is selected and administrators cannot clear it. You should also enable the "Windows Defender Firewall: Protect all network connections" policy setting; otherwise, administrators who log on locally can work around the "Windows Defender Firewall: Do not allow exceptions" policy setting by turning off the firewall.
If you disable this policy setting, Windows Defender Firewall applies other policy settings that allow unsolicited incoming messages. In the Windows Defender Firewall component of Control Panel, the "Block all incoming connections" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall applies other policy settings that allow unsolicited incoming messages. In the Windows Defender Firewall component of Control Panel, the "Block all incoming connections" check box is cleared by default, but administrators can change it.
Spécifie que le Pare-feu Windows Defender bloque tous les messages entrants non sollicités. Ce paramètre de stratégie a priorité sur tous les autres paramètres de stratégie du Pare-feu Windows Defender qui autorisent ce message.
Si vous activez ce paramètre de stratégie, dans le composant Pare-feu Windows Defender du Panneau de configuration, la case à cocher « Bloquer toutes les connexions entrantes » sera activée et les administrateurs ne pourront pas la désactiver. Il est préférable d'activer également le paramètre de stratégie « Pare-feu Windows Defender : protéger toutes les connexions réseau », sinon les administrateurs d'ordinateurs locaux pourront contourner la stratégie « Pare-feu Windows Defender : ne pas autoriser d'exceptions » en désactivant le pare-feu.
Si vous désactivez ce paramètre de stratégie, le Pare-feu Windows Defender appliquera d'autres paramètres de stratégie qui autorisent les messages entrants non sollicités. Dans le composant Pare-feu Windows Defender du Panneau de configuration, la case à cocher « Bloquer toutes les connexions entrantes » sera désactivée et les administrateurs ne pourront pas l'activer.
Si vous ne configurez pas ce paramètre de stratégie, le Pare-feu Windows Defender appliquera d'autres paramètres de stratégie qui autorisent les messages entrants non sollicités. Dans le composant Pare-feu Windows Defender du Panneau de configuration, la case à cocher « Bloquer toutes les connexions entrantes » sera désactivée par défaut, mais les administrateurs pourront la modifier.
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile- Value name
DoNotAllowExceptions
| 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: WindowsFirewall/WF_EnableShield_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DoNotAllowExceptions' -Value 1 -Type DWordDisable
# Disable: WindowsFirewall/WF_EnableShield_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'DoNotAllowExceptions' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsFirewall/WF_EnableShield_Name_1
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile'
Remove-ItemProperty -Path $k -Name 'DoNotAllowExceptions' -ErrorAction SilentlyContinue