dsccommunity / dsccommunity/NetworkingDsc

Firewall and FirewallProfile: Add PolicyStore to allow targeting local group policy

Open
#428 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
235
Forks
93
PR merge metrics
No merged PRs in 30d

Description

Details of the scenario you tried and the problem that is occurring

Enable the "PolicyStore" parameter to be specified to permit targeting the local group policy store of the machine as well as the default persistent store when using both the Firewall and FirewallProfile resources

Verbose logs showing the problem

New Feature request

Suggested solution to the issue

Add "policystore" as a DSC property for both Firewall and FirewallProfile resources
Set the default value of the "policystore" parameter to be "persistentstore" to make it a non-breaking change and accommodate all existing configurations.
Add "policystore" parameter to

  • Get/Set/Test-TargetResource functions in both Resources
  • Get-FirewallRule and Get-FirewalRulleProperty helper functions in Firewall resource
  • Get/Set/New-NetFirewallRule commands in Firewall resource
  • Get/Set-NetFirewallProfile commands in FirewallProfile resource
The DSC configuration that is used to reproduce the issue (as detailed as possible)

New Feature request

The operating system the target node is running

Server 2016/2019 - New Feature request

Version and build of PowerShell the target node is running

New Feature request

Version of the DSC module that was used ('dev' if using current dev branch)

dev

I have made and tested the required changes and can happily submit a pull request with the updates to the code and localization strings.

I have also added two Pester tests to the Firewall resources for the helper function "Get-FirewallRule" when the -policystore is specified and the firewall rule is present/absent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Firewall and FirewallProfile resources and their Get/Set/Test-TargetResource functions, then trace the named helper and NetFirewall command calls. Review the two Pester tests for Get-FirewallRule when PolicyStore is specified and the rule is present or absent. Done means both resources support PolicyStore with persistentstore as the default and the listed helper, command, and test paths are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.