List All Firewall Rules
Get-netfirewallrule | FT name, displaygroup, action, direction, enabled -autosize
Get Log File Location
Get-netfirewallprofile | format-table name, enabled, logfilename -autosize
Display a Single Rule’s Settings
Show-NetFirewallRule | where name -eq "CoreNet-DHCP-In" Get-NetFirewallRule | where name -eq "CoreNet-DHCP-In"
Enable a Single Rule
Get-NetFirewallRule -name CoreNet-DHCP-In | enable-netfirewallrule
Disable a Single Rule
Get-NetFirewallRule -name CoreNet-DHCP-In | disable-netfirewallrule
Enable a Display Group of Rules
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Disable a Display Group of Rules
Disable-NetFirewallRule -DisplayGroup "Remote Desktop"