Server Fault tells that the new syntax to enable ping on Windows Server 2008 is
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allowbut this doesn't work with Windows 7. Here I get
C:\Windows\system32>netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
A specified value is not valid.
Usage: add rule name=<string>
...What is the correct new syntax?
23 Answers
The problem is copy and paste. With the right quotation marks
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allowdoes the job. I'm not sure from which source I copied the problematic version.
1When I typed:
netsh advfirewall firewall add rule name="Enable Echo Ping Request" protocol=icmpv4:8,any dir=in action=allowinto my Windows PowerShell ISE, I got an error: "A specified protocol value is not valid."
I fixed it by using this:
netsh advfirewall firewall add rule name="Enable Echo Ping Request" protocol="icmpv4:8,any" dir=in action=allow 1 Control Panel --> System and Security --> Windows Firewall --> Advanced settings --> right click on Inbound rules --> New rule --> Custom rule -> Next
In Protocol and ports (chosen in the left panel): Protocol: ICMPv4
In the same panel, press button Customize, choose "Specific ICMP types", check the box "Echo Request", and press button OK.
In Name (chosen in the left panel): fill in the Name field and press Apply.
3