How do I test for firewall exceptions in a KACE script?
I'm trying to create a script that enables ICMP echo (ping). I've found a command line that works:
netsh advfirewall firewall add rule name="All ICMP V4" protocol=icmpv4:any,any dir=in action=allow
And if I create a script and put that in:
But the entries for that key on the machine where I ran the netsh command versus one I didn't are the same! There's some other keys for ICMP6 (IPv6 I guess) I couldn't find anything else labeled ICMP.
I guess I don't know how netsh and the registry interact well enough to know what to look for.
Maybe I'm barking up the wrong tree? Is there another way to test if this firewall setting has been made already or not?