Skip to content

Instantly share code, notes, and snippets.

@webtroter
Created March 25, 2024 17:57
Show Gist options
  • Save webtroter/5f86866fb1fa25c86dc50a1fd7d528e3 to your computer and use it in GitHub Desktop.
Save webtroter/5f86866fb1fa25c86dc50a1fd7d528e3 to your computer and use it in GitHub Desktop.
Add "Allow PING" to Windows Firewall
$newNetFirewallRuleSplat = @{
Name = "ICMP-Ping"
DisplayName = "Allow ICMP Ping"
Profile = 'Any'
Direction = 'Inbound'
Action = 'Allow'
Enabled = 'True'
RemoteAddress = "0.0.0.0/0"
Protocol = 'ICMPv4'
EdgeTraversalPolicy = 'Allow'
IcmpType = 'Any'
PolicyStore = 'PersistentStore'
}
New-NetFirewallRule @newNetFirewallRuleSplat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment