pdqcom / PowerShell-Scanners

A community repository of PowerShell Scanners for PDQ Inventory.
MIT License
179 stars 74 forks source link

Windows Firewall Rules not returning Group Policy rules #86

Closed AndrewPla closed 2 years ago

AndrewPla commented 2 years ago

Evan reached out and reports:

I noticed that the rules applied via Group Policy were not showing.

Lines 25 and 29 need to be changed to include Group Policy applied rules:

Line 25: Get-NetFirewallRule -PolicyStore ActiveStore -PolicyStoreSourceType GroupPolicy,Local -Enabled True | Select-Object $Properties

Line 29: Get-NetFirewallRule -PolicyStore ActiveStore -PolicyStoreSourceType GroupPolicy,Local | Select-Object $Properties

Changing it to that will include GP rules and Local rules.