question

AleMadama-9897 avatar image
0 Votes"
AleMadama-9897 asked AleMadama-9897 answered

how to list, by command line, firewall rules filter by...

Hi all,
I would like to use "netsh advfirewall firewall" commands, to list only some rule

for example, filter by:

only blocked rules
only rules belonging to a certain group name


more, if possible, list only rule having name starting with "blabla", then I guess using wildcards...


thanks!

windows-10-security
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Castorix31 avatar image
0 Votes"
Castorix31 answered

You can use findstr to filter names but it is simpler with PowerShell

For example, a test with some filters :

 Show-NetFirewallRule | where {$_.DisplayName -Like "*Test*" -AND $_.Action -eq 'Block' -AND $_.Direction -eq "Inbound"} | select DisplayName



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AleMadama-9897 avatar image
0 Votes"
AleMadama-9897 answered

excellent castorix, thank you!

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.