Disabling/enabling ping response in Windows Server 2012 and 2016

Firewall settings

The easiest way to block or enable ping is to use "Windows Firewall with Advanced Security".

To start it, press Win+R and enter the command wf.msc.

Disabling-enabling ping-run menu

Go to the section of incoming rules ("Rules for inbound connections").
Here we are interested in the predefined rule for IPV4 — ″File and Printer Sharing (echo request - incoming ICMPv4 traffic)″.

Note that there are three rules in the table having the same name.
In fact, this is the same rule that is simply configured for different profiles: one for the domain profile, the second for the general and the private ones.

Disabling-enabling ping-inbound rules

Disabling/enabling the rule

To turn the rule on/off, select it and click on "Disable Rule"/"Enable Rule" in the right panel.

Disabling-enabling ping-rule mode

If the rule is disabled, your server will not respond to ping requests and vice versa, and will respond if the rule is enabled.