mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Merge pull request #5704 from inspec/vasundhara/fix-winodws-firewall-resource
Fix windows_firewall resource fails to validate more than 1 rule depending on how it's executed
This commit is contained in:
commit
45d638e224
1 changed files with 1 additions and 1 deletions
|
@ -77,7 +77,7 @@ module Inspec::Resources
|
|||
|
||||
def load_firewall_profile(profile_name)
|
||||
<<-EOH
|
||||
Remove-TypeData System.Array # workaround for PS bug here: https://bit.ly/2SRMQ8M
|
||||
Get-TypeData -TypeName System.Array | Remove-TypeData # workaround for PS bug here: https://bit.ly/2SRMQ8M
|
||||
$profile = Get-NetFirewallProfile -Name "#{profile_name}"
|
||||
$count = @($profile | Get-NetFirewallRule).Count
|
||||
([PSCustomObject]@{
|
||||
|
|
Loading…
Reference in a new issue