If you are a person managing or using systems running Windows Operating Systems, you would know that starting from Windows XP, Microsoft has provided built in firewall and is by default enabled blocking ICMP response to PING. Though blocking PING response is considered a security best practice when connected to network, it is a general practice by many SysAdmins to disable Windows Firewall whenever a system is built, leaving it vulnerable with all ports open.
Today we will see how to enable ICMP response on Windows machines without disabling firewall.
From Command Line
On Windows 7 and Windows 2008 R2 run the following command to enable ICMP response without disabling the firewall
netsh advfirewall firewall set rule name="File and Printer Sharing (Echo Request - ICMPv4-In)" new enable=yes
If you ever want to disable ICMP response run below command
netsh advfirewall firewall set rule name="File and Printer Sharing (Echo Request - ICMPv4-In)" new enable=no
Refer screenshot below for output from both the commands