You deploy a firewall rule. It arrives. You can see it in the console. The traffic is still blocked. Nothing in the rule looks wrong, no error appears anywhere obvious, and the application owner is asking why IT broke their app.
This is one of the most common false-negative troubleshooting traps in Windows. The rule you are looking at is the intended configuration. What decides whether a packet lives or dies is the effective configuration, and Windows builds that from three network profiles, several separate rule stores, and a per-profile switch that decides whether local rules count at all. This post walks through each of those pieces, then shows you how to read the effective set instead of the intended set.
Windows Defender Firewall evaluates only the rules that belong to the profile currently in force, and Windows picks that profile itself from the network category of each connected adapter. Rules also live in several stores at once: a local store, Group Policy, an MDM store, and service-hardening stores, all merged into an ActiveStore. Two settings, AllowLocalPolicyMerge and AllowLocalIPsecPolicyMerge, decide whether the local store is honoured at all, and when they are off, every rule an application installer created for itself is silently ignored while still appearing enabled in the console. Read the merged result with Get-NetFirewallProfile -PolicyStore ActiveStore and Get-NetFirewallRule -PolicyStore ActiveStore -TracePolicyStore, never from the rule list you deployed.
The problem: the rule exists and the traffic does not
Start with the shape of the failure, because it is always the same shape. Someone needs inbound traffic to reach an application. You write an allow rule, deploy it from Microsoft Intune or Group Policy, and confirm it landed on the device. The application still cannot be reached.
There are only a handful of reasons this happens, and none of them produces an error message.
- The rule is scoped to a profile that is not active. A rule that lists only the Domain profile is invisible on a laptop sitting on a hotel network.
- The rule is in a store that is not being honoured. If local rule merge is off, a rule an installer wrote locally is inert, but still shows as enabled.
- An explicit block rule wins. Block beats allow in Windows Defender Firewall, so one forgotten block rule can quietly cancel a whole allow set.
- The rule is disabled, or was never applied. Windows can refuse a rule it cannot parse and carry on without telling anyone who is looking at the console.
What Windows Defender Firewall actually is. It is a host-based firewall built into every Windows edition and enabled by default, filtering traffic on criteria such as source and destination IP address, IP protocol, and source and destination port number. Microsoft states the default behaviour plainly: block all incoming traffic, unless solicited or matching a rule, and allow all outgoing traffic, unless matching a rule. So on inbound, no rule means no traffic. That is why a missing or ignored allow rule looks exactly like a block.
The reason this is hard to debug is that every management surface shows you a different slice of the truth. The Windows Defender Firewall with Advanced Security console shows you the rules in the store you are pointed at. netsh shows you the local store by default. Intune shows you what you asked for. Only one view shows you what the packet will meet, and this post ends with that view.
Why it happens: three profiles, several stores, one merge switch
Profiles: Windows chooses, not you
A profile is a named set of firewall settings and rules that applies to a class of network. Windows Defender Firewall has exactly three, and Microsoft documents how each one is selected.
- Domain. Applied automatically to a device joined to an Active Directory domain when it detects the availability of a domain controller. Microsoft is explicit that this profile cannot be set manually.
- Private. Intended for private networks such as a home network. It can be set manually on an interface by an administrator.
- Public. Designed with higher security in mind for public networks such as hotspots, and it is the default profile for unidentified networks.
Selection is driven by Network Location Awareness (NLA), the Windows component that classifies the network an adapter is attached to. On Microsoft Entra joined devices, where there is no domain controller to detect, the NetworkListManager Policy CSP lets you nominate endpoints that mark a network as the domain network.
The second half of the rule matters more for laptops. Microsoft documents that when a device is connected to multiple networks, the most restrictive profile is applied to all network adapters, with public considered most restrictive, then private, then domain. One tethered phone can therefore move an entire domain-joined machine onto the Public profile, and every Domain-only rule stops being evaluated.
Gotcha: the profile bitmask in the CSP is not obvious. In the Firewall CSP, a rule's Profiles node is a bitmask: 0x1 is Domain, 0x2 is Private, 0x4 is Public, and 0x7FFFFFFF means all profiles. Deploy a rule with 0x1 because someone typed "domain" into a ticket and you have built a rule that will never fire on a remote worker's device. In the Intune UI the same choice is the Network type field, and leaving it unselected applies the rule to all network types.
Stores: your rule is one voice in a choir
Windows keeps firewall rules in several places, and the enforced set is the sum of them. The -PolicyStore parameter on the NetSecurity cmdlets is the cleanest way to see the model, because Microsoft documents each store by name.
| Policy store | Contains | Writable |
|---|---|---|
PersistentStore | Local, sometimes called static, rules created manually or by an application installer. Not from Group Policy. Attached to the ActiveStore and active immediately. | Yes |
ActiveStore | The currently active policy: the sum of all stores that apply, that is the resultant set of policy plus the local stores. This is the one that matters. | No |
RSOP | The sum of all Group Policy Objects applied to the computer. | No |
SystemDefaults | The default state of the firewall rules that ship with Windows. | No |
StaticServiceStore | The service restrictions that ship with Windows, known as Windows Service Hardening. | No |
ConfigurableServiceStore | Service restrictions added for non-Microsoft services, plus network isolation rules for app containers. | Yes |
Rules deployed by an MDM such as Intune arrive through the Firewall CSP into the MDM store, and are observed in the ActiveStore with a source type of MDM, a value that does not appear in Microsoft's documented list for that field, so read it as helpful rather than guaranteed. Group Policy rules appear with the documented source type GroupPolicy. Local rules appear as Local. That single field is what turns "I deployed a rule" into "the device is enforcing my rule".
One more documented behaviour bites people who copy rules between stores. Microsoft notes that a rule Name acts like a filename: during Group Policy processing and policy merge, rules that have the same name but come from multiple stores overwrite one another so that only one exists. A GPO with higher precedence therefore silently replaces the local version of a rule with the same name.
The merge switch: the setting that makes local rules vanish
Now the heart of it. Rule merging policy settings control how rules from different policy sources can be combined, and they are configured per profile. Microsoft's own wording for the firewall half is unambiguous.
AllowLocalPolicyMerge, from the Firewall CSP: "This value is used as an on/off switch. If this value is false, firewall rules from the local store are ignored and not enforced. The merge law for this option is to always use the value of the GroupPolicyRSoPStore." The default is true. AllowLocalIPsecPolicyMerge does the same job for connection security rules: "If this value is false, connection security rules from the local store are ignored and not enforced, regardless of the schema version and connection security rule version."
Read that carefully. The local rules are not deleted, disabled, or flagged. They are ignored. The console still lists them, still shows a green tick, and the traffic they were written for still dies. This is the single most misdiagnosed firewall condition in managed estates, because the evidence you are looking at is telling you the opposite of the truth.
Microsoft is equally clear about the consequence: "If merging of local policies is disabled, centralized deployment of rules is required for any app that needs inbound connectivity." Turning merge off is a legitimate and often correct hardening choice. It is also a commitment to owning every inbound rule your estate will ever need.
Gotcha: local Group Policy still wins. Microsoft documents an exception that surprises almost everyone. "Local Group Policy firewall rules and settings are applied even when rule merging is disabled through MDM or Group Policy." Rules configured locally through secpol.msc or gpedit.msc are stored in the same location as centrally managed Group Policy, so they survive the merge switch. Only a local administrator can use those tools, but on a device where someone has admin rights, "merge is off" does not mean "no local configuration".
There is a second trap in the Intune wording. In the Windows firewall profile, the setting is presented as Ignore all local firewall rules and its partner as Ignore connection security rules. Setting Ignore to Yes means merge is off. The polarity is inverted relative to the CSP node it drives, so a reviewer skim-reading a policy export can easily conclude the opposite of what the device will do.
Precedence: block beats allow, with one documented exception
Microsoft publishes the precedence rules for both inbound and outbound, and they are short.
- Explicitly defined allow rules take precedence over the default block setting.
- Explicit block rules take precedence over any conflicting allow rules.
- More specific rules take precedence over less specific rules, except where an explicit block rule applies. Microsoft's example: if rule 1 covers an IP address range and rule 2 covers a single IP host address, rule 2 takes precedence.
Outbound rules follow the same behaviours. Critically, Microsoft states that "Windows Firewall doesn't support weighted, administrator-assigned rule ordering". There is no rule number to bump. If a block rule overlaps your allow rule, the only fix is to change one of the two rules.
The documented exception is authenticated bypass. A firewall rule created with -OverrideBlockRules $true and an authentication requirement allows traffic from a specified trusted device or user to override firewall block rules. Microsoft's stated use case is scanning servers that must reach managed devices without opening ports. It is the only sanctioned way to beat a block rule, and it requires IPsec authentication to work.
The engine underneath: what calls what
It helps to know which component is doing the ignoring. The chain, from policy to packet, runs like this.
- Policy arrives, from Group Policy, the Firewall CSP, or a local write, and lands in a registry store.
- MpsSvc, the service whose display name is Windows Defender Firewall, reads those stores, applies the merge laws, and produces the effective rule set. Its code is
C:\Windows\System32\mpssvc.dll, hosted in asvchost.exeprocess. - MpsSvc hands filters to the Base Filtering Engine. Microsoft describes BFE as "a user-mode service (bfe.dll running in a svchost.exe process) that coordinates the WFP components", whose principal tasks are adding and removing filters, storing filter configuration, and enforcing configuration security.
- The Windows Filtering Platform filter engine does the work, with a user-mode component that performs RPC and IPsec filtering and a kernel-mode component that filters at the network and transport layers of the TCP/IP stack.
- Callout drivers plug into the kernel-mode layers. The firewall's own authorization driver is
C:\Windows\System32\drivers\mpsdrv.sys.
| Binary | Location | Role in the flow |
|---|---|---|
mpssvc.dll | System32 | The MpsSvc service DLL. Reads the stores, merges policy, publishes filters. |
bfe.dll | System32 | The Base Filtering Engine service. Coordinates WFP and stores filter configuration. |
mpsdrv.sys | System32\drivers | Windows Defender Firewall Authorization Driver. MpsSvc declares a dependency on it. |
wfplwfs.sys | System32\drivers | Observed on a live device as the WFP lightweight filter bound to adapters, with component IDs ms_wfplwf_upper and ms_wfplwf_lower. Check it with Get-NetAdapterBinding -AllBindings. |
FirewallAPI.dll | System32 | The management API and the source of the localised rule names such as @FirewallAPI.dll,-25351. |
Do not fix a firewall problem by stopping the service. Microsoft says explicitly that stopping the Windows Firewall service is not supported and can cause the Start menu to stop working, modern applications to fail to install or update, activation by phone to fail, and other incompatibilities. The supported way to turn the firewall off is to disable the profiles and leave the service running. On a live device you can confirm the dependency chain in the registry: MpsSvc declares DependOnService of mpsdrv, bfe, nsi, so stopping the Base Filtering Engine takes the firewall service down with it.
How to verify: reading the effective rule set
Everything above is background. This section is the actual technique: stop reading the policy you wrote, and read what the device merged.
Step 1: which profile is actually in force
The two cmdlets below answer that. The first reports the network category of each connected interface, which is what NLA decided. The second reports the firewall's own per-profile state as merged into the ActiveStore.
Read the output top to bottom. If NetworkCategory is Public and your rule is Domain-scoped, you have your answer and you can stop. If AllowLocalFirewallRules is False and your rule was created locally, likewise.
Step 2: where did each rule come from
The -TracePolicyStore switch asks Windows to record, for each rule in the ActiveStore, which store it came from. Grouping on that field gives you the policy-versus-local split in one line.
Microsoft explains why that last pair of commands is needed: when you run a Get cmdlet for a rule, common conditions such as addresses and ports do not appear, because they are represented in separate objects called filters, in a one-to-one relationship with the rule. If you never pull the filter, you never see the port your rule actually opened.
Gotcha: netsh reads a different store. On a device where merge is switched off by MDM, netsh advfirewall show currentprofile reports LocalFirewallRules N/A (GPO-store only) and shows logging as disabled, while Get-NetFirewallProfile -PolicyStore ActiveStore on the same device reports AllowLocalFirewallRules False and logging enabled. Neither tool is lying. netsh is showing the local store, PowerShell was asked for the merged one. This is observed behaviour on a Windows 11 build 26200 device, so treat netsh output as a local-store view and confirm anything important against the ActiveStore.
Step 3: the registry, one store at a time
Each store is a registry location, and reading them side by side shows you which one is imposing the setting. Group Policy writes under the policies hive; the local and MDM stores live under the SharedAccess service key.
| Subkey or value under that parent | Store | What it holds |
|---|---|---|
FirewallRules | Local | One registry value per local rule, the rule expressed as a versioned string such as v2.33|Action=Allow|Active=TRUE|Dir=In|Protocol=41|App=System|... |
DomainProfile, StandardProfile, PublicProfile | Local | Per-profile local settings: EnableFirewall, DisableNotifications, and a Logging subkey. Note that the private profile is called StandardProfile here. |
Mdm\FirewallRules and Mdm\<Profile> | MDM | Rules and per-profile settings written by the Firewall CSP, including AllowLocalPolicyMerge and AllowLocalIPsecPolicyMerge as REG_DWORD. |
RestrictedServices\AppIso\FirewallRules | Configurable service | Network isolation rules created for app containers. Microsoft documents that these are not accessible with Get-NetFirewallRule. |
The Group Policy store is a different hive, and its profile subkey names differ from the local store's. Microsoft's protocol documentation for the merge values is precise about this.
| Value | Valid subkeys | Type and data |
|---|---|---|
AllowLocalPolicyMerge | DomainProfile, PrivateProfile, PublicProfile. Microsoft states it MUST NOT be present on StandardProfile. | REG_DWORD, 0x00000000 or 0x00000001 |
AllowLocalIPsecPolicyMerge | Same three, same exclusion of StandardProfile. | REG_DWORD, 0x00000000 or 0x00000001 |
FirewallRules (subkey) | Directly under the parent key. | One value per GPO-delivered rule, same string grammar as the local store |
That naming split is worth internalising. The private profile is StandardProfile in the local store and PrivateProfile in the Group Policy store. A detection script that assumes one name for both stores will report a clean device that is actually misconfigured.
Step 4: Event Viewer, on two different logs
The firewall writes operational events to its own channel, and the filtering platform writes enforcement events to the Security log. They are separate, and you need both.
Microsoft does not publish a per-ID reference for that channel. The IDs below were observed on a live Windows 11 Enterprise build 26200 device, with their literal message text. Treat them as useful signposts, not as a contract: an undocumented event ID can change in any update, so do not build compliance detection on them.
| Observed ID | Message text on the device | Why it matters here |
|---|---|---|
| 2010 | Network profile changed on an interface | The moment the active profile flipped. Includes old and new profile per adapter. |
| 2008 | Windows Defender Firewall Group Policy settings have changed. The new settings have been applied | Policy arrival. Absence of this after a GPO change means the change never landed. |
| 2083 | A Windows Defender Firewall setting has changed | A per-profile setting changed, including the merge switches. |
| 2097 / 2099 / 2052 | A rule has been added to / modified in / deleted in the Windows Defender Firewall exception list | The rule lifecycle. Each entry names the Rule ID and Rule Name. |
| 2059 | All rules have been deleted from the Windows Defender Firewall configuration on this computer | A store was replaced wholesale, naming the modifying application. |
| 2011 | Windows Defender Firewall was unable to notify the user that it blocked an application from accepting incoming connections | Something was blocked and the user never found out. |
The Security log is the documented half, and it is where enforcement is proved. Two audit subcategories matter, and neither is on by default.
| Event ID | Documented title | Subcategory required |
|---|---|---|
| 4957 (F) | Windows Firewall did not apply the following rule | MPSSVC Rule-Level Policy Change |
| 4958 (F) | Windows Firewall did not apply the following rule because the rule referred to items not configured on this computer | MPSSVC Rule-Level Policy Change |
| 4956 (S) | Windows Firewall has changed the active profile | MPSSVC Rule-Level Policy Change |
| 4954 (S) | Windows Firewall Group Policy settings have changed. The new settings have been applied | MPSSVC Rule-Level Policy Change |
| 5157 (F) | The Windows Filtering Platform has blocked a connection | Filtering Platform Connection |
| 5152 (F) | The Windows Filtering Platform blocked a packet | Filtering Platform Packet Drop |
| 5155 (F) | The Windows Filtering Platform has blocked an application or service from listening on a port for incoming connections | Filtering Platform Connection |
| 5031 (F) | The Windows Firewall Service blocked an application from accepting incoming connections on the network | Filtering Platform Connection |
Events 4957 and 4958 are the ones worth wiring into a SIEM permanently. They are the only place Windows tells you it received a rule and declined to use it.
Turning the audit subcategories on is a Group Policy or Intune job, and it is genuinely per-device policy rather than a firewall setting.
Do not switch on packet-drop auditing fleet-wide. Microsoft rates the event volume for Audit Filtering Platform Packet Drop as High, states that 5152 "is generated for every received network packet", and recommends no auditing on workstations, member servers and domain controllers alike. Its own guidance is to use 5157 instead, because it "contains almost the same information and generates per-connection, not per-packet". Enable these subcategories on one device, for one investigation, and turn them off afterwards. Filling the Security log is a good way to lose the evidence you actually needed.
Step 5: the firewall log file
The text log is the fastest way to see individual drops without touching audit policy. It records nothing until you ask it to. The default path is %windir%\system32\logfiles\firewall\pfirewall.log and the default maximum size in the Group Policy dialog is 4,096 KB. Microsoft recommends raising that to at least 20,480 KB, notes the maximum is 32,767 KB, and recommends a separate file per profile.
Read a DROP line right to left. The path column tells you the direction, RECEIVE for inbound and SEND for outbound, and the pid column gives you the process to blame. Addresses in the block above are RFC 5737 documentation addresses standing in for the real ones from a genuine capture.
Gotcha: the log folder may not exist. Microsoft documents that when logging is configured by policy, the folder in the default or custom path may not exist, and that the fix is to create it manually and grant mpssvc FullControl. Until you do, you get a policy that says logging is on and a device that logs nothing. Check the file's LastWriteTime, not just the setting.
Step 6: the console's own effective view
The Windows Defender Firewall with Advanced Security snap-in has an often-ignored node that shows the merged set. In Microsoft's own lab walkthrough for disabling local merge, step four is to expand Monitoring and select Firewall to see the list of rules active on the local computer, and the expected result once merge is off is that no local rules are listed. If a rule appears under Inbound Rules but not under Monitoring, it is not being enforced.
The fix: scope it right, then decide about merge
Fixing this is a decision tree, not a single setting. Work through it in order.
- Confirm the active profile with
Get-NetConnectionProfile. If your rule excludes it, widen the rule's scope rather than changing the network category. - Confirm the merge state per profile in the ActiveStore. If merge is off by design, the rule must be deployed centrally, full stop.
- Search for an overlapping block rule, because block beats allow and no ordering can save you.
- Check 4957 and 4958 to rule out a rule that was received and rejected.
Deploying the rule and the merge settings from Intune
Intune splits this across two profile types: one for per-profile firewall settings, one for the rules themselves.
- Sign in to the Microsoft Intune admin center.
- Go to Endpoint security > Firewall > Create policy.
- Choose platform Windows 10, Windows 11, and Windows Server and profile Windows Firewall, then select Create.
- Enter a name and an optional description, then select Next.
- Under Configuration settings, expand each network location type in turn: Domain, Private and Public. Configure all three, even if you only care about one. A device that roams will use whichever you neglected.
- For each profile, set Turn on Windows Firewall to Yes, then set Block inbound connections and Block outbound connections to match your standard.
- Decide the merge behaviour with Ignore all local firewall rules and Ignore connection security rules. Remember the inverted wording: Yes means local rules are ignored, which is
AllowLocalPolicyMergeset to false. - Still per profile, configure Log file path, Enable log dropped packets, Enable log success connections and Log max file size.
- Select Next twice, assign the policy to a group containing the target devices, then Next and Create.
The rules themselves go in a separate profile, and this is the one to use when merge is off.
- Create the policy as above, choosing the Windows Firewall Rules profile.
- Add a rule and give it a Name and Description. The name must not contain a forward slash, which the CSP rejects.
- Set Direction to In or Out and Action to Allowed or Blocked.
- Set Network type. Select Domain, Private and Public unless you have a specific reason not to. Leaving the field unselected applies the rule to all network types.
- Under Application settings, give a File path such as
C:\Program Files\Contoso\app.exe, or a Service name short name when a service rather than an application is sending the traffic. Wildcard paths such asC:\*\app.exeare not supported. - Under Port and protocol settings, set Protocol to
6for TCP or17for UDP, then the local and remote ports. - Under IP address settings, prefer a specific Remote address range, or the token
LocalSubnet, over any address. - Assign and create.
If you would rather use a custom policy, the CSP nodes are the same ones the built-in profile drives.
| Setting | OMA-URI | Value |
|---|---|---|
| Local firewall rule merge, Domain | ./Vendor/MSFT/Firewall/MdmStore/DomainProfile/AllowLocalPolicyMerge | bool, default true |
| Local IPsec rule merge, Domain | ./Vendor/MSFT/Firewall/MdmStore/DomainProfile/AllowLocalIpsecPolicyMerge | bool, default true |
| Log dropped packets, Public | ./Vendor/MSFT/Firewall/MdmStore/PublicProfile/EnableLogDroppedPackets | bool, default false |
| Log file path, Public | ./Vendor/MSFT/Firewall/MdmStore/PublicProfile/LogFilePath | string, default %systemroot%\system32\LogFiles\Firewall\pfirewall.log |
| Rules container | ./Vendor/MSFT/Firewall/MdmStore/FirewallRules/<RuleName> | node, must be wrapped in an Atomic block |
The same settings in Group Policy
Group Policy exposes both halves in the same properties dialog, per profile tab. This surface is not CSP-only or GPO-only; both exist and both write the values documented earlier.
- Open the GPO in the Group Policy Management Editor and expand Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security.
- In the details pane, in the Overview section, select Windows Defender Firewall Properties.
- Select the tab for the profile you are configuring: Domain Profile, Private Profile or Public Profile.
- In the Settings section, select Customize.
- In the Rule merging section, set Apply local firewall rules to No to stop honouring local firewall rules.
- In the same section, set Apply local connection security rules to No to stop honouring local IPsec rules.
- Optionally set Display a notification to No, which suppresses the prompt that otherwise creates rules on the user's behalf.
- Select OK to return to the profile tab. Under Logging, select Customize.
- Set the log path, raise the size limit, and set Log dropped packets to Yes. Nothing is logged until you do.
- Select OK twice, then repeat from step 3 for the other two profiles.
Tip straight from Microsoft's own recommendations. Create your rules in all three profiles, but only enable the firewall rule group on the profiles that suit the scenario. A sharing application used only at home gets rules in all three profiles with the group enabled on Private alone. That way the rule exists everywhere for review and audit, and takes effect in exactly one place. Microsoft also suggests scoping the remote address to LocalSubnet on the private and public profiles while leaving it unrestricted on Domain.
Turning merge off is a one-way door for application owners. Microsoft's warning is explicit: although the setting prevents a local administrator from applying a rule, it also prevents the firewall from prompting the user about a new program and creating an inbound rule when the user approves. If you enable it, you must make sure every program that requires firewall rules has the correct rules defined in your policy. Its own list of reasons an application is blocked ends with exactly this: "Local policy merge is disabled, preventing the application or network service from creating local rules." Plan the inventory before you flip the switch, not after the helpdesk queue does it for you.
Surfaces that do not apply here
Two items on the usual checklist are genuinely not part of this feature, and saying so is more useful than silence. There is no scheduled task under \Microsoft\Windows\ that drives Windows Defender Firewall; enforcement is entirely the MpsSvc service plus the WFP filter engine, and a search of the task library on a live device returns nothing firewall-related. There is also no separate Defender antivirus or attack-surface-reduction setting involved: the firewall shares the Defender name and the Endpoint security node in Intune, but the profile type you need is Firewall or Windows Firewall Rules, not Antivirus and not Attack surface reduction.
Proof it worked: a real posture report
The companion script for this post reads every surface above and prints one report. It is read-only: no Set, New, Remove, Enable or Disable against any rule, service or registry value. It needs no module, because NetSecurity ships with Windows, and it runs on both Windows PowerShell 5.1 and PowerShell 7.
That output is the whole argument of this post in one screen. The firewall is healthy, the policy applied cleanly, and 395 rules that look perfect in the console are doing nothing. Nobody would find that by reading the rule list.
Two details are worth calling out because they are the failure modes the script is built to catch. First, the merge column shows NotConfigured locally and False effectively, which is how you tell a central override from a local choice. Second, the script exits 1 and says the report would be misleading if any required read fails, rather than printing a clean summary with blank fields.
Where to get it. Get-FirewallEffectivePosture.ps1 lives in the Windows-11-Scripts repository, under the folder windows-firewall-profile-rule-merge-behaviour. Run it elevated for the audit-policy and log-ACL checks, or pass -SkipAuditPolicy when running unelevated. Add -ShowMismatchedRules and -ShowIgnoredLocalRules to list the rules behind the two warning counts.
References
- Windows Firewall overview - the three profiles, how each is selected, default inbound and outbound behaviour, and why not to stop
MpsSvc. - Windows Firewall rules - rule precedence, local policy merge, the local Group Policy exception, and the design recommendations.
- Firewall CSP - every node quoted here, including
AllowLocalPolicyMerge,AllowLocalIpsecPolicyMerge, the profile bitmask and the logging nodes. - Configure Windows Firewall logging - default path, size guidance, the Intune and GPO click paths, and the
mpssvcpermission fix. - Manage Windows Firewall with the command line - PowerShell and netsh equivalents, policy stores, filter objects and authenticated bypass.
- Get-NetFirewallRule - the documented
-PolicyStorevalues,-TracePolicyStore, and the note that filter conditions live in separate objects. - MS-GPFAS: Allow Local Firewall Rule Policy Merge - the exact Group Policy registry keys, value name and data, including the
StandardProfileexclusion. - Audit MPSSVC Rule-Level Policy Change - the 4944 to 4958 event list, including 4957 and 4958 for rules that were not applied.
- Event 5157: The Windows Filtering Platform has blocked a connection and Audit Filtering Platform Packet Drop - field descriptions and the event-volume warnings.
- WFP architecture - the Base Filtering Engine,
bfe.dll, the user-mode and kernel-mode filter engine components, and callout drivers.
Community deep-dives, each checked for this post:
| Author | Post | Why it is useful here |
|---|---|---|
| Rudy Ooms | The Windows Defender Firewall rises | Walks the Intune firewall rule deployment end to end and confirms where MDM rules land in the registry: the SharedAccess\Parameters\FirewallPolicy\Mdm\FirewallRules key. |
| Nickolaj Andersen, MSEndpointMgr | Manage Windows Firewall rules in Windows 10 with Microsoft Intune | Documents the console quirk that matters most when verifying: Intune-assigned rules show up under the Monitoring - Firewall node rather than the inbound and outbound rule lists. |
Download it from Imran76Awan/Windows-11-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.