Jordan Borean
Jordan Borean
_From @ShachafGoldstein on Aug 12, 2019 17:03_ Can you post the output of ` $fw = New-Object -ComObject HNetCfg.FwPolicy2; $fw.Rules.name`
_From @octagonprogramming on Aug 12, 2019 17:11_ There is no output for this either.
_From @octagonprogramming on Aug 12, 2019 17:15_ When running this I get the name for all rules on the system ``` $fw.Rules | select-object -property name ```
_From @octagonprogramming on Aug 12, 2019 17:20_ In the output of the above command the is what is shown for the name of Cortana: ``` @{Microsoft.Windows.Cortana_1.7.0.14393_neutral_neutral_cw5n1h2txyewy?ms-resource://Microsoft.Windows.Cortana/resources/PackageDisplayName} @{Microsoft.Windows.Cortana_1.7.0.14393_neutral_neutral_cw5n1h2txyewy?ms-resource://Microsoft.Windows.Cortana/resources/PackageDisplayName} ```
_From @octagonprogramming on Aug 12, 2019 17:26_ Using the above hash I got the expected fail for the rule Code: ``` - name: Testing win_firewall_rule: name: '@{Microsoft.Windows.Cortana_1.7.0.14393_neutral_neutral_cw5n1h2txyewy?ms-resource://Microsoft.Windows.Cortana/resources/PackageDisplayName}' action: allow direction:...
_From @octagonprogramming on Aug 12, 2019 17:59_ On further review it was discovered that how the com object is seeing the rule v.s. how powershell is seeing the rule. For...
_From @octagonprogramming on Aug 12, 2019 18:02_ As you can see above the 'Group' from the powershell command output is what the COM is gettting for the name and description...
_From @ShachafGoldstein on Aug 12, 2019 18:50_ I see. On my machine (insider) I have both simple Cortana rules and the type with the @{} name. The only solution I...
_From @frogstarr78 on Aug 12, 2019 22:41_ Couldn't you use the built in powershell modules for handling firewall rules?
_From @jborean93 on Aug 12, 2019 23:02_ > Couldn't you use the built in powershell modules for handling firewall rules? I haven't read the actual conversation here but no not...