diff --git a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 b/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 index 63ada99745..33ac7f3fbb 100644 --- a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 +++ b/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 @@ -205,6 +205,7 @@ $direction=Get-Attr $params "direction" ""; $force=Get-Attr $params "force" $false; $action=Get-Attr $params "action" ""; +$misArg = '' # Check the arguments if ($enable -ne $null) { if ($enable -eq $true) { @@ -262,7 +263,7 @@ foreach ($arg in $args){ $winprofile=Get-Attr $params "profile" "current"; $fwsettings.Add("profile", $winprofile) -if ($($($misArg|measure).count) -gt 0){ +if ($misArg){ $result=New-Object psobject @{ changed=$false failed=$true