Skip to content

Add Microsoft.Windows/FirewallRuleList resource#1453

Merged
SteveL-MSFT merged 3 commits intoPowerShell:mainfrom
SteveL-MSFT:windows-firewall
Apr 1, 2026
Merged

Add Microsoft.Windows/FirewallRuleList resource#1453
SteveL-MSFT merged 3 commits intoPowerShell:mainfrom
SteveL-MSFT:windows-firewall

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

PR Summary

Add resource to manage Windows Firewall rules

Copilot AI review requested due to automatic review settings March 27, 2026 22:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_firewall resource 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 windows crate 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.

@SteveL-MSFT SteveL-MSFT marked this pull request as draft March 28, 2026 00:20
@SteveL-MSFT SteveL-MSFT marked this pull request as ready for review April 1, 2026 03:56
@SteveL-MSFT SteveL-MSFT merged commit e1d03cd into PowerShell:main Apr 1, 2026
19 checks passed
@SteveL-MSFT SteveL-MSFT deleted the windows-firewall branch April 1, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants