Windows Defender Firewall: Protect all network connections
Pare-feu Windows Defender : protéger toutes les connexions réseau
Explanation
Turns on Windows Defender Firewall.
If you enable this policy setting, Windows Defender Firewall runs and ignores the "Computer Configuration\Administrative Templates\Network\Network Connections\Prohibit use of Internet Connection Firewall on your DNS domain network" policy setting.
If you disable this policy setting, Windows Defender Firewall does not run. This is the only way to ensure that Windows Defender Firewall does not run and administrators who log on locally cannot start it.
If you do not configure this policy setting, administrators can use the Windows Defender Firewall component in Control Panel to turn Windows Defender Firewall on or off, unless the "Prohibit use of Internet Connection Firewall on your DNS domain network" policy setting overrides.
Active le Pare-feu Windows Defender.
Si vous activez ce paramètre de stratégie, le Pare-feu Windows Defender s'exécutera en ignorant le paramètre de stratégie « Configuration ordinateur\Modèles d'administration\Réseau\Connexions réseau\Interdire l'utilisation de pare-feu de connexion Internet sur le réseau de votre domaine DNS ».
Si vous désactivez ce paramètre, le Pare-feu Windows Defender ne s'exécutera pas. Ceci est la seule façon de vous assurer que le Pare-feu Windows Defender ne s'exécute pas et que les administrateurs qui ouvrent une session locale ne peuvent pas le démarrer.
Si vous ne configurez pas ce paramètre de stratégie, les administrateurs pourront utiliser le composant Pare-feu Windows Defender du Panneau de configuration pour activer ou désactiver le Pare-feu Windows Defender, sauf si le paramètre de stratégie « Interdire l'utilisation de pare-feu de connexion Internet sur le réseau de votre domaine DNS » prévaut.
Use cases
Turns on Windows Defender Firewall in the standard (private) profile, used outside the domain, for example at a teleworker's home or on a known local network. Without it, a machine taken off the corporate network may lose its network protection.
Microsoft source: Configure Windows Firewall rules with Group Policy
Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile- Value name
EnableFirewall
| 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_EnableFirewall_Name_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableFirewall' -Value 1 -Type DWordDisable
# Disable: WindowsFirewall/WF_EnableFirewall_Name_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'EnableFirewall' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": WindowsFirewall/WF_EnableFirewall_Name_2
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile'
Remove-ItemProperty -Path $k -Name 'EnableFirewall' -ErrorAction SilentlyContinue