Returns the computer's list of firewall rules.
Get-FirewallRule [<CommonParameters>]
Sends objects down the pipeline for each of the firewall's rules. Each object contains the following properties:
This data is parsed from the output of:
netsh advfirewall firewall show rule name=all.
If the firewall isn't configurable, writes an error and returns without returning any objects.
Get-FirewallRule
Here's a sample of the output:
EdgeTraversal : Defer to application
Grouping : Remote Assistance
Action : Allow
RemotePort : Any
RemoteIP : Any
LocalIP : Any
Name : Remote Assistance (PNRP-In)
Direction : In
Profiles : Domain,Private
LocalPort : 3540
Protocol : UDP
Enabled : True
EdgeTraversal : No
Grouping : Remote Assistance
Action : Allow
RemotePort : Any
RemoteIP : Any
LocalIP : Any
Name : Remote Assistance (PNRP-Out)
Direction : Out
Profiles : Domain,Private
LocalPort : Any
Protocol : UDP
Enabled : True