Add Microsoft.Windows/FirewallRuleList resource#1453
Merged
SteveL-MSFT merged 3 commits intoPowerShell:mainfrom Apr 1, 2026
Merged
Add Microsoft.Windows/FirewallRuleList resource#1453SteveL-MSFT merged 3 commits intoPowerShell:mainfrom
Microsoft.Windows/FirewallRuleList resource#1453SteveL-MSFT merged 3 commits intoPowerShell:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new DSC resource, Microsoft.Windows/FirewallRuleList, implemented as a Rust-based command resource to manage Windows Firewall rules via the netfw.h COM APIs.
Changes:
- Introduces the
windows_firewallresource manifest and Rust implementation (get/set/export). - Adds PowerShell Pester tests covering get/set/export scenarios, including wildcard filtering for export.
- Registers the new crate in the workspace and enables the Windows Firewall feature in the
windowscrate feature set.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| resources/windows_firewall/windows_firewall.dsc.resource.json | New resource manifest + embedded JSON schema for FirewallRuleList. |
| resources/windows_firewall/src/main.rs | Resource CLI entrypoint (get/set/export routing, input parsing, JSON output). |
| resources/windows_firewall/src/firewall.rs | Windows-only COM implementation for querying/updating/exporting firewall rules. |
| resources/windows_firewall/src/types.rs | Data model types for rules + error type used by the implementation. |
| resources/windows_firewall/src/util.rs | Filter/wildcard matching utilities + a small unit test. |
| resources/windows_firewall/locales/en-us.toml | i18n strings for CLI and firewall operation errors. |
| resources/windows_firewall/Cargo.toml | New Rust crate definition/dependencies for the resource. |
| resources/windows_firewall/.project.data.json | Build/packaging metadata for the new resource. |
| resources/windows_firewall/tests/windows_firewall_get.tests.ps1 | New Pester tests for get behavior. |
| resources/windows_firewall/tests/windows_firewall_set.tests.ps1 | New Pester tests for set behavior. |
| resources/windows_firewall/tests/windows_firewall_export.tests.ps1 | New Pester tests for export behavior + filtering semantics. |
| Cargo.toml | Adds resources/windows_firewall to workspace members/default-members/Windows group + enables WindowsFirewall feature. |
| Cargo.lock | Locks new crate/dependency graph entries. |
| lib/dsc-lib-jsonschema/.versions.json | Bumps latest patch version entry and adds V3_1_3 to the recognized list. |
resources/windows_firewall/tests/windows_firewall_export.tests.ps1
Outdated
Show resolved
Hide resolved
resources/windows_firewall/tests/windows_firewall_set.tests.ps1
Outdated
Show resolved
Hide resolved
resources/windows_firewall/tests/windows_firewall_get.tests.ps1
Outdated
Show resolved
Hide resolved
cezary13k
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Add resource to manage Windows Firewall rules