Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\Windows\IPSec\ICFv4 |
|---|
| Option | Value | Type | Allowed values |
|---|
| Define IPsec peers to be exempted from firewall policy: | BypassFirewall | REG_SZ | Text |
What it does (vendor explanation)
Allows unsolicited incoming messages from specified systems that authenticate using the IPsec transport.
If you enable this policy setting, you must type a security descriptor containing a list of computers or groups of computers. If a computer on that list authenticates using IPsec, Windows Defender Firewall does not block its unsolicited messages. This policy setting overrides other policy settings that would block those messages.
If you disable or do not configure this policy setting, Windows Defender Firewall makes no exception for messages sent by computers that authenticate using IPsec. If you enable this policy setting and add systems to the list, upon disabling this policy, Windows Defender Firewall deletes the list.
Note: You define entries in this list by using Security Descriptor Definition Language (SDDL) strings. For more information about the SDDL format, see the Windows Defender Firewall deployment information at the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=25131).
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Windows Defender Firewall: Allow authenticated IPsec bypass
PowerShell equivalent (generated from the template)
# Define IPsec peers to be exempted from firewall policy:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\IPSec\ICFv4' -Name 'BypassFirewall' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_AuthenticatedBypass_Name
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow outbound destination unreachable | AllowOutboundDestinationUnreachable | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound source quench | AllowOutboundSourceQuench | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow redirect | AllowRedirect | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound echo request | AllowInboundEchoRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound router request | AllowInboundRouterRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound time exceeded | AllowOutboundTimeExceeded | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound parameter problem | AllowOutboundParameterProblem | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound timestamp request | AllowInboundTimestampRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound mask request | AllowInboundMaskRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound packet too big | AllowOutboundPacketTooBig | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
What it does (vendor explanation)
Defines the set of Internet Control Message Protocol (ICMP) message types that Windows Defender Firewall allows. Utilities can use ICMP messages to determine the status of other computers. For example, Ping uses the echo request message. If you do not enable the "Allow inbound echo request" message type, Windows Defender Firewall blocks echo request messages sent by Ping running on other computers, but it does not block outbound echo request messages sent by Ping running on this computer.
If you enable this policy setting, you must specify which ICMP message types Windows Defender Firewall allows this computer to send or receive.
If you disable this policy setting, Windows Defender Firewall blocks all the listed incoming and outgoing ICMP message types. As a result, utilities that use the blocked ICMP messages will not be able to send those messages to or from this computer. If you enable this policy setting and allow certain message types, then later disable this policy setting, Windows Defender Firewall deletes the list of message types that you had enabled.
If you do not configure this policy setting, Windows Defender Firewall behaves as if you had disabled it.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound echo requests, even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow file and printer sharing exception," "Windows Defender Firewall: Allow remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Note: Other Windows Defender Firewall policy settings affect only incoming messages, but several of the options of the "Windows Defender Firewall: Allow ICMP exceptions" policy setting affect outgoing communication.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow ICMP exceptions
PowerShell equivalent (generated from the template)
# Allow outbound destination unreachable
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundDestinationUnreachable' -Value <value> -PropertyType DWord -Force
# Allow outbound source quench
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundSourceQuench' -Value <value> -PropertyType DWord -Force
# Allow redirect
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowRedirect' -Value <value> -PropertyType DWord -Force
# Allow inbound echo request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundEchoRequest' -Value <value> -PropertyType DWord -Force
# Allow inbound router request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundRouterRequest' -Value <value> -PropertyType DWord -Force
# Allow outbound time exceeded
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundTimeExceeded' -Value <value> -PropertyType DWord -Force
# Allow outbound parameter problem
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundParameterProblem' -Value <value> -PropertyType DWord -Force
# Allow inbound timestamp request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundTimestampRequest' -Value <value> -PropertyType DWord -Force
# Allow inbound mask request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowInboundMaskRequest' -Value <value> -PropertyType DWord -Force
# Allow outbound packet too big
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\IcmpSettings' -Name 'AllowOutboundPacketTooBig' -Value <value> -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_IcmpSettings_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows this computer to receive inbound Remote Desktop requests. To do this, Windows Defender Firewall opens TCP port 3389.
If you enable this policy setting, Windows Defender Firewall opens this port so that this computer can receive Remote Desktop requests. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks this port, which prevents this computer from receiving Remote Desktop requests. If an administrator attempts to open this port by adding it to a local port exceptions list, Windows Defender Firewall does not open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open this port. Therefore, the computer cannot receive Remote Desktop requests unless an administrator uses other policy settings to open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared. Administrators can change this check box."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow inbound Remote Desktop exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\RemoteDesktop' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesFile Explorer and desktopADMX: WindowsFirewall.admx · policy name WF_RemoteDesktop_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows this computer to receive unsolicited inbound Plug and Play messages sent by network devices, such as routers with built-in firewalls. To do this, Windows Defender Firewall opens TCP port 2869 and UDP port 1900.
If you enable this policy setting, Windows Defender Firewall opens these ports so that this computer can receive Plug and Play messages. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks these ports, which prevents this computer from receiving Plug and Play messages. If an administrator attempts to open these ports by adding them to a local port exceptions list, Windows Defender Firewall does not open the ports. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open these ports. Therefore, the computer cannot receive Plug and Play messages unless an administrator uses other policy settings to open the required ports or enable the required programs. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared. Administrators can change this check box."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow inbound UPnP framework exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\UPnPFramework' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesADMX: WindowsFirewall.admx · policy name WF_UniversalPlugAndPlay_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\FileAndPrint |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows inbound file and printer sharing. To do this, Windows Defender Firewall opens UDP ports 137 and 138, and TCP ports 139 and 445.
If you enable this policy setting, Windows Defender Firewall opens these ports so that this computer can receive print jobs and requests for access to shared files. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks these ports, which prevents this computer from sharing files and printers. If an administrator attempts to open any of these ports by adding them to a local port exceptions list, Windows Defender Firewall does not open the port. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open these ports. Therefore, the computer cannot share files or printers unless an administrator uses other policy settings to open the required ports. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is cleared. Administrators can change this check box.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo requests (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow inbound file and printer sharing exception
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\FileAndPrint' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\FileAndPrint' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Services\FileAndPrint' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesADMX: WindowsFirewall.admx · policy name WF_FileAndPrint_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\RemoteAdminSettings |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows remote administration of this computer using administrative tools such as the Microsoft Management Console (MMC) and Windows Management Instrumentation (WMI). To do this, Windows Defender Firewall opens TCP ports 135 and 445. Services typically use these ports to communicate using remote procedure calls (RPC) and Distributed Component Object Model (DCOM). Additionally, on Windows XP Professional with at least SP2 and Windows Server 2003 with at least SP1, this policy setting also allows SVCHOST.EXE and LSASS.EXE to receive unsolicited incoming messages and allows hosted services to open additional dynamically-assigned ports, typically in the range of 1024 to 1034. On Windows Vista, this policy setting does not control connections to SVCHOST.EXE and LSASS.EXE.
If you enable this policy setting, Windows Defender Firewall allows the computer to receive the unsolicited incoming messages associated with remote administration. You must specify the IP addresses or subnets from which these incoming messages are allowed.
If you disable or do not configure this policy setting, Windows Defender Firewall does not open TCP port 135 or 445. Also, on Windows XP Professional with at least SP2 and Windows Server 2003 with at least SP1, Windows Defender Firewall prevents SVCHOST.EXE and LSASS.EXE from receiving unsolicited incoming messages, and prevents hosted services from opening additional dynamically-assigned ports. Because disabling this policy setting does not block TCP port 445, it does not conflict with the "Windows Defender Firewall: Allow file and printer sharing exception" policy setting.
Note: Malicious users often attempt to attack networks and computers using RPC and DCOM. We recommend that you contact the manufacturers of your critical programs to determine if they are hosted by SVCHOST.exe or LSASS.exe or if they require RPC and DCOM communication. If they do not, then do not enable this policy setting.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo request messages (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow inbound remote administration exception
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\RemoteAdminSettings' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\RemoteAdminSettings' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\RemoteAdminSettings' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_RemoteAdmin_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts |
|---|
| Value name | AllowUserPrefMerge |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Allows administrators to use the Windows Defender Firewall component in Control Panel to define a local port exceptions list. Windows Defender Firewall uses two port exceptions lists; the other is defined by the "Windows Defender Firewall: Define inbound port exceptions" policy setting.
If you enable this policy setting, the Windows Defender Firewall component in Control Panel allows administrators to define a local port exceptions list.
If you disable this policy setting, the Windows Defender Firewall component in Control Panel does not allow administrators to define a local port exceptions list. However, local administrators will still be allowed to create firewall rules in the Windows Defender Firewall with Advanced Security snap-in. If you wish to prevent all locally created rules from applying, use the Group Policy Object Editor snap-in and configure Computer Configuration\Windows Settings\Security Settings\Windows Defender Firewall with Advanced Security to specify that local firewall rules should not apply.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow local port exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts' -Name 'AllowUserPrefMerge' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_OpenPortsLocal_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications |
|---|
| Value name | AllowUserPrefMerge |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Allows administrators to use the Windows Defender Firewall component in Control Panel to define a local program exceptions list. Windows Defender Firewall uses two program exceptions lists; the other is defined by the "Windows Defender Firewall: Define inbound program exceptions" policy setting.
If you enable this policy setting, the Windows Defender Firewall component in Control Panel allows administrators to define a local program exceptions list.
If you disable this policy setting, the Windows Defender Firewall component in Control Panel does not allow administrators to define a local program exceptions list. However, local administrators will still be allowed to create firewall rules in the Windows Defender Firewall with Advanced Security snap-in. If you wish to prevent all locally created rules from applying, use the Group Policy Object Editor snap-in and configure Computer Configuration\Windows Settings\Security Settings\Windows Defender Firewall with Advanced Security to specify that local firewall rules should not apply.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow local program exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications' -Name 'AllowUserPrefMerge' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_AllowedProgramsLocal_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging |
|---|
| Disabled also writes | SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging LogDroppedPackets = 0 (REG_SZ) |
|---|
| Disabled also writes | SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging LogSuccessfulConnections = 0 (REG_SZ) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Log dropped packets | LogDroppedPackets | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Log successful connections | LogSuccessfulConnections | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Log file path and name: | LogFilePath | REG_SZ | Text |
| Size limit (KB): | LogFileSize | REG_DWORD | Number 128 to 32767 |
What it does (vendor explanation)
Allows Windows Defender Firewall to record information about the unsolicited incoming messages that it receives.
If you enable this policy setting, Windows Defender Firewall writes the information to a log file. You must provide the name, location, and maximum size of the log file. The location can contain environment variables. You must also specify whether to record information about incoming messages that the firewall blocks (drops) and information about successful incoming and outgoing connections. Windows Defender Firewall does not provide an option to log successful incoming messages.
If you are configuring the log file name, ensure that the Windows Defender Firewall service account has write permissions to the folder containing the log file. Default path for the log file is %systemroot%\system32\LogFiles\Firewall\pfirewall.log.
If you disable this policy setting, Windows Defender Firewall does not record information in the log file. If you enable this policy setting, and Windows Defender Firewall creates the log file and adds information, then upon disabling this policy setting, Windows Defender Firewall leaves the log file intact.
If you do not configure this policy setting, Windows Defender Firewall behaves as if the policy setting were disabled.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Allow logging
PowerShell equivalent (generated from the template)
# Log dropped packets
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging' -Name 'LogDroppedPackets' -Value <value> -PropertyType DWord -Force
# Log successful connections
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging' -Name 'LogSuccessfulConnections' -Value <value> -PropertyType DWord -Force
# Log file path and name:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging' -Name 'LogFilePath' -Value <value> -PropertyType String -Force
# Size limit (KB):
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\Logging' -Name 'LogFileSize' -Value <value> -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_Logging_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Define port exceptions: | SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts\List\(list subkey) | REG_SZ (one value per entry) | One value per list entry |
What it does (vendor explanation)
Allows you to view and change the inbound port exceptions list defined by Group Policy. Windows Defender Firewall uses two port exception lists: one is defined by Group Policy settings and the other is defined by the Windows Defender Firewall component in Control Panel.
If you enable this policy setting, you can view and change the inbound port exceptions list defined by Group Policy. To view this port exceptions list, enable the policy setting and then click the Show button. To add a port, enable the policy setting, note the syntax, click the Show button. In the Show Contents dialog box type a definition string that uses the syntax format. To remove a port, click its definition, and then press the DELETE key. To edit a definition, remove the current definition from the list and add a new one with different parameters. To allow administrators to add ports to the local port exceptions list that is defined by the Windows Defender Firewall component in Control Panel, also enable the "Windows Defender Firewall: Allow local port exceptions" policy setting.
If you disable this policy setting, the port exceptions list defined by Group Policy is deleted, but other policy settings can continue to open or block ports. Also, if a local port exceptions list exists, it is ignored unless you enable the "Windows Defender Firewall: Allow local port exceptions" policy setting.
If you do not configure this policy setting, Windows Defender Firewall uses only the local port exceptions list that administrators define by using the Windows Defender Firewall component in Control Panel. Other policy settings can continue to open or block ports.
Note: If you type an invalid definition string, Windows Defender Firewall adds it to the list without checking for errors, and therefore you can accidentally create multiple entries for the same port with conflicting Scope or Status values. Scope parameters are combined for multiple entries. If entries have different Status values, any definition with the Status set to "disabled" overrides all definitions with the Status set to "enabled," and the port does not receive messages. Therefore, if you set the Status of a port to "disabled," you can prevent administrators from using the Windows Defender Firewall component in Control Panel to enable the port.
Note: The only effect of setting the Status value to "disabled" is that Windows Defender Firewall ignores other definitions for that port that set the Status to "enabled." If another policy setting opens a port, or if a program in the program exceptions list asks Windows Defender Firewall to open a port, Windows Defender Firewall opens the port.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo request messages (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Define inbound port exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\GloballyOpenPorts' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_OpenPorts_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Define program exceptions: | SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications\List\(list subkey) | REG_SZ (one value per entry) | One value per list entry |
What it does (vendor explanation)
Allows you to view and change the program exceptions list defined by Group Policy. Windows Defender Firewall uses two program exception lists: one is defined by Group Policy settings and the other is defined by the Windows Defender Firewall component in Control Panel.
If you enable this policy setting, you can view and change the program exceptions list defined by Group Policy. If you add a program to this list and set its status to Enabled, that program can receive unsolicited incoming messages on any port that it asks Windows Defender Firewall to open, even if that port is blocked by another policy setting, such as the "Windows Defender Firewall: Define inbound port exceptions" policy setting. To view the program list, enable the policy setting and then click the Show button. To add a program, enable the policy setting, note the syntax, click the Show button. In the Show Contents dialog box type a definition string that uses the syntax format. To remove a program, click its definition, and then press the DELETE key. To edit a definition, remove the current definition from the list and add a new one with different parameters. To allow administrators to add programs to the local program exceptions list that is defined by the Windows Defender Firewall component in Control Panel, also enable the "Windows Defender Firewall: Allow local program exceptions" policy setting.
If you disable this policy setting, the program exceptions list defined by Group Policy is deleted. If a local program exceptions list exists, it is ignored unless you enable the "Windows Defender Firewall: Allow local program exceptions" policy setting.
If you do not configure this policy setting, Windows Defender Firewall uses only the local program exceptions list that administrators define by using the Windows Defender Firewall component in Control Panel.
Note: If you type an invalid definition string, Windows Defender Firewall adds it to the list without checking for errors. This allows you to add programs that you have not installed yet, but be aware that you can accidentally create multiple entries for the same program with conflicting Scope or Status values. Scope parameters are combined for multiple entries.
Note: If you set the Status parameter of a definition string to "disabled," Windows Defender Firewall ignores port requests made by that program and ignores other definitions that set the Status of that program to "enabled." Therefore, if you set the Status to "disabled," you prevent administrators from allowing the program to ask Windows Defender Firewall to open additional ports. However, even if the Status is "disabled," the program can still receive unsolicited incoming messages through a port if another policy setting opens that port.
Note: Windows Defender Firewall opens ports for the program only when the program is running and "listening" for incoming messages. If the program is not running, or is running but not listening for those messages, Windows Defender Firewall does not open its ports.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Define inbound program exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile\AuthorizedApplications' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_AllowedPrograms_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile |
|---|
| Value name | DoNotAllowExceptions |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor 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.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Do not allow exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Name 'DoNotAllowExceptions' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_EnableShield_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile |
|---|
| Value name | DisableNotifications |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Prevents Windows Defender Firewall from displaying notifications to the user when a program requests that Windows Defender Firewall add the program to the program exceptions list.
If you enable this policy setting, Windows Defender Firewall prevents the display of these notifications.
If you disable this policy setting, Windows Defender Firewall allows the display of these notifications. In the Windows Defender Firewall component of Control Panel, the "Notify me when Windows Defender Firewall blocks a new program" check box is selected and administrators cannot clear it.
If you do not configure this policy setting, Windows Defender Firewall behaves as if the policy setting were disabled, except that in the Windows Defender Firewall component of Control Panel, the "Notify me when Windows Defender Firewall blocks a new program" check box is selected by default, and administrators can change it.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Prohibit notifications
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Name 'DisableNotifications' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_Notifications_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile |
|---|
| Value name | DisableUnicastResponsesToMulticastBroadcast |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Prevents this computer from receiving unicast responses to its outgoing multicast or broadcast messages.
If you enable this policy setting, and this computer sends multicast or broadcast messages to other computers, Windows Defender Firewall blocks the unicast responses sent by those other computers.
If you disable or do not configure this policy setting, and this computer sends a multicast or broadcast message to other computers, Windows Defender Firewall waits as long as three seconds for unicast responses from the other computers and then blocks all later responses.
Note: This policy setting has no effect if the unicast message is a response to a Dynamic Host Configuration Protocol (DHCP) broadcast message sent by this computer. Windows Defender Firewall always permits those DHCP unicast responses. However, this policy setting can interfere with the NetBIOS messages that detect name conflicts.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Prohibit unicast response to multicast or broadcast requests
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Name 'DisableUnicastResponsesToMulticastBroadcast' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_UnicastResponseToMulticast_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile |
|---|
| Value name | EnableFirewall |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor 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.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Domain Profile > Windows Defender Firewall: Protect all network connections
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile' -Name 'EnableFirewall' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_EnableFirewall_Name_1
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow outbound destination unreachable | AllowOutboundDestinationUnreachable | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound source quench | AllowOutboundSourceQuench | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow redirect | AllowRedirect | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound echo request | AllowInboundEchoRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound router request | AllowInboundRouterRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound time exceeded | AllowOutboundTimeExceeded | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound parameter problem | AllowOutboundParameterProblem | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound timestamp request | AllowInboundTimestampRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow inbound mask request | AllowInboundMaskRequest | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Allow outbound packet too big | AllowOutboundPacketTooBig | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
What it does (vendor explanation)
Defines the set of Internet Control Message Protocol (ICMP) message types that Windows Defender Firewall allows. Utilities can use ICMP messages to determine the status of other computers. For example, Ping uses the echo request message. If you do not enable the "Allow inbound echo request" message type, Windows Defender Firewall blocks echo request messages sent by Ping running on other computers, but it does not block outbound echo request messages sent by Ping running on this computer.
If you enable this policy setting, you must specify which ICMP message types Windows Defender Firewall allows this computer to send or receive.
If you disable this policy setting, Windows Defender Firewall blocks all the listed incoming and outgoing ICMP message types. As a result, utilities that use the blocked ICMP messages will not be able to send those messages to or from this computer. If you enable this policy setting and allow certain message types, then later disable this policy setting, Windows Defender Firewall deletes the list of message types that you had enabled.
If you do not configure this policy setting, Windows Defender Firewall behaves as if you had disabled it.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound echo requests, even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow file and printer sharing exception," "Windows Defender Firewall: Allow remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Note: Other Windows Defender Firewall policy settings affect only incoming messages, but several of the options of the "Windows Defender Firewall: Allow ICMP exceptions" policy setting affect outgoing communication.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow ICMP exceptions
PowerShell equivalent (generated from the template)
# Allow outbound destination unreachable
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowOutboundDestinationUnreachable' -Value <value> -PropertyType DWord -Force
# Allow outbound source quench
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowOutboundSourceQuench' -Value <value> -PropertyType DWord -Force
# Allow redirect
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowRedirect' -Value <value> -PropertyType DWord -Force
# Allow inbound echo request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowInboundEchoRequest' -Value <value> -PropertyType DWord -Force
# Allow inbound router request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowInboundRouterRequest' -Value <value> -PropertyType DWord -Force
# Allow outbound time exceeded
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowOutboundTimeExceeded' -Value <value> -PropertyType DWord -Force
# Allow outbound parameter problem
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowOutboundParameterProblem' -Value <value> -PropertyType DWord -Force
# Allow inbound timestamp request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowInboundTimestampRequest' -Value <value> -PropertyType DWord -Force
# Allow inbound mask request
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowInboundMaskRequest' -Value <value> -PropertyType DWord -Force
# Allow outbound packet too big
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\IcmpSettings' -Name 'AllowOutboundPacketTooBig' -Value <value> -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_IcmpSettings_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows this computer to receive inbound Remote Desktop requests. To do this, Windows Defender Firewall opens TCP port 3389.
If you enable this policy setting, Windows Defender Firewall opens this port so that this computer can receive Remote Desktop requests. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks this port, which prevents this computer from receiving Remote Desktop requests. If an administrator attempts to open this port by adding it to a local port exceptions list, Windows Defender Firewall does not open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open this port. Therefore, the computer cannot receive Remote Desktop requests unless an administrator uses other policy settings to open the port. In the Windows Defender Firewall component of Control Panel, the "Remote Desktop" check box is cleared. Administrators can change this check box."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow inbound Remote Desktop exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\RemoteDesktop' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesFile Explorer and desktopADMX: WindowsFirewall.admx · policy name WF_RemoteDesktop_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\UPnPFramework |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows this computer to receive unsolicited inbound Plug and Play messages sent by network devices, such as routers with built-in firewalls. To do this, Windows Defender Firewall opens TCP port 2869 and UDP port 1900.
If you enable this policy setting, Windows Defender Firewall opens these ports so that this computer can receive Plug and Play messages. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks these ports, which prevents this computer from receiving Plug and Play messages. If an administrator attempts to open these ports by adding them to a local port exceptions list, Windows Defender Firewall does not open the ports. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open these ports. Therefore, the computer cannot receive Plug and Play messages unless an administrator uses other policy settings to open the required ports or enable the required programs. In the Windows Defender Firewall component of Control Panel, the "UPnP framework" check box is cleared. Administrators can change this check box."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow inbound UPnP framework exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\UPnPFramework' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\UPnPFramework' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\UPnPFramework' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesADMX: WindowsFirewall.admx · policy name WF_UniversalPlugAndPlay_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\FileAndPrint |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows inbound file and printer sharing. To do this, Windows Defender Firewall opens UDP ports 137 and 138, and TCP ports 139 and 445.
If you enable this policy setting, Windows Defender Firewall opens these ports so that this computer can receive print jobs and requests for access to shared files. You must specify the IP addresses or subnets from which these incoming messages are allowed. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is selected and administrators cannot clear it.
If you disable this policy setting, Windows Defender Firewall blocks these ports, which prevents this computer from sharing files and printers. If an administrator attempts to open any of these ports by adding them to a local port exceptions list, Windows Defender Firewall does not open the port. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is cleared and administrators cannot select it.
If you do not configure this policy setting, Windows Defender Firewall does not open these ports. Therefore, the computer cannot share files or printers unless an administrator uses other policy settings to open the required ports. In the Windows Defender Firewall component of Control Panel, the "File and Printer Sharing" check box is cleared. Administrators can change this check box.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo requests (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow inbound file and printer sharing exception
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\FileAndPrint' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\FileAndPrint' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Services\FileAndPrint' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)Startup, Run keys and servicesADMX: WindowsFirewall.admx · policy name WF_FileAndPrint_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\RemoteAdminSettings |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Allow unsolicited incoming messages from these IP addresses: | RemoteAddresses | REG_SZ | Text |
What it does (vendor explanation)
Allows remote administration of this computer using administrative tools such as the Microsoft Management Console (MMC) and Windows Management Instrumentation (WMI). To do this, Windows Defender Firewall opens TCP ports 135 and 445. Services typically use these ports to communicate using remote procedure calls (RPC) and Distributed Component Object Model (DCOM). Additionally, on Windows XP Professional with at least SP2 and Windows Server 2003 with at least SP1, this policy setting also allows SVCHOST.EXE and LSASS.EXE to receive unsolicited incoming messages and allows hosted services to open additional dynamically-assigned ports, typically in the range of 1024 to 1034. On Windows Vista, this policy setting does not control connections to SVCHOST.EXE and LSASS.EXE.
If you enable this policy setting, Windows Defender Firewall allows the computer to receive the unsolicited incoming messages associated with remote administration. You must specify the IP addresses or subnets from which these incoming messages are allowed.
If you disable or do not configure this policy setting, Windows Defender Firewall does not open TCP port 135 or 445. Also, on Windows XP Professional with at least SP2 and Windows Server 2003 with at least SP1, Windows Defender Firewall prevents SVCHOST.EXE and LSASS.EXE from receiving unsolicited incoming messages, and prevents hosted services from opening additional dynamically-assigned ports. Because disabling this policy setting does not block TCP port 445, it does not conflict with the "Windows Defender Firewall: Allow file and printer sharing exception" policy setting.
Note: Malicious users often attempt to attack networks and computers using RPC and DCOM. We recommend that you contact the manufacturers of your critical programs to determine if they are hosted by SVCHOST.exe or LSASS.exe or if they require RPC and DCOM communication. If they do not, then do not enable this policy setting.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo request messages (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow inbound remote administration exception
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\RemoteAdminSettings' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\RemoteAdminSettings' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
# Allow unsolicited incoming messages from these IP addresses:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\RemoteAdminSettings' -Name 'RemoteAddresses' -Value <value> -PropertyType String -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_RemoteAdmin_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts |
|---|
| Value name | AllowUserPrefMerge |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Allows administrators to use the Windows Defender Firewall component in Control Panel to define a local port exceptions list. Windows Defender Firewall uses two port exceptions lists; the other is defined by the "Windows Defender Firewall: Define inbound port exceptions" policy setting.
If you enable this policy setting, the Windows Defender Firewall component in Control Panel allows administrators to define a local port exceptions list.
If you disable this policy setting, the Windows Defender Firewall component in Control Panel does not allow administrators to define a local port exceptions list. However, local administrators will still be allowed to create firewall rules in the Windows Defender Firewall with Advanced Security snap-in. If you wish to prevent all locally created rules from applying, use the Group Policy Object Editor snap-in and configure Computer Configuration\Windows Settings\Security Settings\Windows Defender Firewall with Advanced Security to specify that local firewall rules should not apply.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow local port exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts' -Name 'AllowUserPrefMerge' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_OpenPortsLocal_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications |
|---|
| Value name | AllowUserPrefMerge |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Allows administrators to use the Windows Defender Firewall component in Control Panel to define a local program exceptions list. Windows Defender Firewall uses two program exceptions lists; the other is defined by the "Windows Defender Firewall: Define inbound program exceptions" policy setting.
If you enable this policy setting, the Windows Defender Firewall component in Control Panel allows administrators to define a local program exceptions list.
If you disable this policy setting, the Windows Defender Firewall component in Control Panel does not allow administrators to define a local program exceptions list. However, local administrators will still be allowed to create firewall rules in the Windows Defender Firewall with Advanced Security snap-in. If you wish to prevent all locally created rules from applying, use the Group Policy Object Editor snap-in and configure Computer Configuration\Windows Settings\Security Settings\Windows Defender Firewall with Advanced Security to specify that local firewall rules should not apply.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow local program exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications' -Name 'AllowUserPrefMerge' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_AllowedProgramsLocal_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging |
|---|
| Disabled also writes | SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging LogDroppedPackets = 0 (REG_SZ) |
|---|
| Disabled also writes | SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging LogSuccessfulConnections = 0 (REG_SZ) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Log dropped packets | LogDroppedPackets | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Log successful connections | LogSuccessfulConnections | REG_DWORD | Checked: 1 (REG_DWORD); unchecked: 0 (REG_DWORD) |
| Log file path and name: | LogFilePath | REG_SZ | Text |
| Size limit (KB): | LogFileSize | REG_DWORD | Number 128 to 32767 |
What it does (vendor explanation)
Allows Windows Defender Firewall to record information about the unsolicited incoming messages that it receives.
If you enable this policy setting, Windows Defender Firewall writes the information to a log file. You must provide the name, location, and maximum size of the log file. The location can contain environment variables. You must also specify whether to record information about incoming messages that the firewall blocks (drops) and information about successful incoming and outgoing connections. Windows Defender Firewall does not provide an option to log successful incoming messages.
If you are configuring the log file name, ensure that the Windows Defender Firewall service account has write permissions to the folder containing the log file. Default path for the log file is %systemroot%\system32\LogFiles\Firewall\pfirewall.log.
If you disable this policy setting, Windows Defender Firewall does not record information in the log file. If you enable this policy setting, and Windows Defender Firewall creates the log file and adds information, then upon disabling this policy setting, Windows Defender Firewall leaves the log file intact.
If you do not configure this policy setting, Windows Defender Firewall behaves as if the policy setting were disabled.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Allow logging
PowerShell equivalent (generated from the template)
# Log dropped packets
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogDroppedPackets' -Value <value> -PropertyType DWord -Force
# Log successful connections
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogSuccessfulConnections' -Value <value> -PropertyType DWord -Force
# Log file path and name:
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogFilePath' -Value <value> -PropertyType String -Force
# Size limit (KB):
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\Logging' -Name 'LogFileSize' -Value <value> -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_Logging_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Define port exceptions: | SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts\List\(list subkey) | REG_SZ (one value per entry) | One value per list entry |
What it does (vendor explanation)
Allows you to view and change the inbound port exceptions list defined by Group Policy. Windows Defender Firewall uses two port exception lists: one is defined by Group Policy settings and the other is defined by the Windows Defender Firewall component in Control Panel.
If you enable this policy setting, you can view and change the inbound port exceptions list defined by Group Policy. To view this port exceptions list, enable the policy setting and then click the Show button. To add a port, enable the policy setting, note the syntax, click the Show button. In the Show Contents dialog box type a definition string that uses the syntax format. To remove a port, click its definition, and then press the DELETE key. To edit a definition, remove the current definition from the list and add a new one with different parameters. To allow administrators to add ports to the local port exceptions list that is defined by the Windows Defender Firewall component in Control Panel, also enable the "Windows Defender Firewall: Allow local port exceptions" policy setting.
If you disable this policy setting, the port exceptions list defined by Group Policy is deleted, but other policy settings can continue to open or block ports. Also, if a local port exceptions list exists, it is ignored unless you enable the "Windows Defender Firewall: Allow local port exceptions" policy setting.
If you do not configure this policy setting, Windows Defender Firewall uses only the local port exceptions list that administrators define by using the Windows Defender Firewall component in Control Panel. Other policy settings can continue to open or block ports.
Note: If you type an invalid definition string, Windows Defender Firewall adds it to the list without checking for errors, and therefore you can accidentally create multiple entries for the same port with conflicting Scope or Status values. Scope parameters are combined for multiple entries. If entries have different Status values, any definition with the Status set to "disabled" overrides all definitions with the Status set to "enabled," and the port does not receive messages. Therefore, if you set the Status of a port to "disabled," you can prevent administrators from using the Windows Defender Firewall component in Control Panel to enable the port.
Note: The only effect of setting the Status value to "disabled" is that Windows Defender Firewall ignores other definitions for that port that set the Status to "enabled." If another policy setting opens a port, or if a program in the program exceptions list asks Windows Defender Firewall to open a port, Windows Defender Firewall opens the port.
Note: If any policy setting opens TCP port 445, Windows Defender Firewall allows inbound ICMP echo request messages (the message sent by the Ping utility), even if the "Windows Defender Firewall: Allow ICMP exceptions" policy setting would block them. Policy settings that can open TCP port 445 include "Windows Defender Firewall: Allow inbound file and printer sharing exception," "Windows Defender Firewall: Allow inbound remote administration exception," and "Windows Defender Firewall: Define inbound port exceptions."
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Define inbound port exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\GloballyOpenPorts' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_OpenPorts_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications |
|---|
| Value name | Enabled |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
| Option | Value | Type | Allowed values |
|---|
| Define program exceptions: | SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications\List\(list subkey) | REG_SZ (one value per entry) | One value per list entry |
What it does (vendor explanation)
Allows you to view and change the program exceptions list defined by Group Policy. Windows Defender Firewall uses two program exception lists: one is defined by Group Policy settings and the other is defined by the Windows Defender Firewall component in Control Panel.
If you enable this policy setting, you can view and change the program exceptions list defined by Group Policy. If you add a program to this list and set its status to Enabled, that program can receive unsolicited incoming messages on any port that it asks Windows Defender Firewall to open, even if that port is blocked by another policy setting, such as the "Windows Defender Firewall: Define inbound port exceptions" policy setting. To view the program list, enable the policy setting and then click the Show button. To add a program, enable the policy setting, note the syntax, click the Show button. In the Show Contents dialog box type a definition string that uses the syntax format. To remove a program, click its definition, and then press the DELETE key. To edit a definition, remove the current definition from the list and add a new one with different parameters. To allow administrators to add programs to the local program exceptions list that is defined by the Windows Defender Firewall component in Control Panel, also enable the "Windows Defender Firewall: Allow local program exceptions" policy setting.
If you disable this policy setting, the program exceptions list defined by Group Policy is deleted. If a local program exceptions list exists, it is ignored unless you enable the "Windows Defender Firewall: Allow local program exceptions" policy setting.
If you do not configure this policy setting, Windows Defender Firewall uses only the local program exceptions list that administrators define by using the Windows Defender Firewall component in Control Panel.
Note: If you type an invalid definition string, Windows Defender Firewall adds it to the list without checking for errors. This allows you to add programs that you have not installed yet, but be aware that you can accidentally create multiple entries for the same program with conflicting Scope or Status values. Scope parameters are combined for multiple entries.
Note: If you set the Status parameter of a definition string to "disabled," Windows Defender Firewall ignores port requests made by that program and ignores other definitions that set the Status of that program to "enabled." Therefore, if you set the Status to "disabled," you prevent administrators from allowing the program to ask Windows Defender Firewall to open additional ports. However, even if the Status is "disabled," the program can still receive unsolicited incoming messages through a port if another policy setting opens that port.
Note: Windows Defender Firewall opens ports for the program only when the program is running and "listening" for incoming messages. If the program is not running, or is running but not listening for those messages, Windows Defender Firewall does not open its ports.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Define inbound program exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile\AuthorizedApplications' -Name 'Enabled' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_AllowedPrograms_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile |
|---|
| Value name | DoNotAllowExceptions |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor 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.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Do not allow exceptions
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Name 'DoNotAllowExceptions' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_EnableShield_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile |
|---|
| Value name | DisableNotifications |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Prevents Windows Defender Firewall from displaying notifications to the user when a program requests that Windows Defender Firewall add the program to the program exceptions list.
If you enable this policy setting, Windows Defender Firewall prevents the display of these notifications.
If you disable this policy setting, Windows Defender Firewall allows the display of these notifications. In the Windows Defender Firewall component of Control Panel, the "Notify me when Windows Defender Firewall blocks a new program" check box is selected and administrators cannot clear it.
If you do not configure this policy setting, Windows Defender Firewall behaves as if the policy setting were disabled, except that in the Windows Defender Firewall component of Control Panel, the "Notify me when Windows Defender Firewall blocks a new program" check box is selected by default, and administrators can change it.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Prohibit notifications
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Name 'DisableNotifications' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_Notifications_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile |
|---|
| Value name | DisableUnicastResponsesToMulticastBroadcast |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor explanation)
Prevents this computer from receiving unicast responses to its outgoing multicast or broadcast messages.
If you enable this policy setting, and this computer sends multicast or broadcast messages to other computers, Windows Defender Firewall blocks the unicast responses sent by those other computers.
If you disable or do not configure this policy setting, and this computer sends a multicast or broadcast message to other computers, Windows Defender Firewall waits as long as three seconds for unicast responses from the other computers and then blocks all later responses.
Note: This policy setting has no effect if the unicast message is a response to a Dynamic Host Configuration Protocol (DHCP) broadcast message sent by this computer. Windows Defender Firewall always permits those DHCP unicast responses. However, this policy setting can interfere with the NetBIOS messages that detect name conflicts.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Prohibit unicast response to multicast or broadcast requests
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Name 'DisableUnicastResponsesToMulticastBroadcast' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_UnicastResponseToMulticast_Name_2
Per machine Windows 11Windows Server 2025Windows Server 2022Windows Server 2019Windows Server 2016
Supported on: At least Windows XP Professional with SP2
When the GPO stops applying: Windows removes the value (it is under a Policies branch). How cleanup works
| Registry key | HKLM\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile |
|---|
| Value name | EnableFirewall |
|---|
| Enabled writes | 1 (REG_DWORD) |
|---|
| Disabled writes | 0 (REG_DWORD) |
|---|
What it does (vendor 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.
Group Policy path: Computer Configuration > Administrative Templates > Network > Network Connections > Windows Defender Firewall > Standard Profile > Windows Defender Firewall: Protect all network connections
PowerShell equivalent (generated from the template)
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Force | Out-Null
New-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfile' -Name 'EnableFirewall' -Value 1 -PropertyType DWord -Force
Group Policy or Intune is the supported way to set policies. Writing the same values directly works like a local policy and is removed by nothing: delete the values to return to "Not configured".
Security hardeningRemote Desktop and RDSNetworking (TCP/IP, SMB, DNS)ADMX: WindowsFirewall.admx · policy name WF_EnableFirewall_Name_2