Windows Server 2022, by default, does not respond to the ping command because its Windows Firewall settings are configured to block all inbound ICMP traffic. Although this enhances security, but also makes network troubleshooting a challenging task. To enable ping responses, you can allow ICMP traffic through Windows Firewall either using the command line or through the GUI.
Command Line
To allow ping requests from any source, run this command in the command prompt or PowerShell:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Alternatively, you can use the Windows graphical user interface to accomplish this:
Allow ping through Windows Firewall GUI
- The first thing we need to do is open Windows Firewall, which can be done in a few different ways. The preferred method is to open start simply, then type firewall. Click Windows Firewall with Advanced Security as shown below.

- The basic firewall interface can also be opened by typing ‘firewall’ and pressing enter in PowerShell
- Click “Advanced Settings” at the bottom of the page.

- In the Windows Defender Firewall with Advanced Security window that opens, select Inbound Rules.
- Select “File and printer sharing (Echo Request – ICMPv4-In)” under Inbound Rules and enable it
- This rule will only allow IPv4 requests in, you can customize it to only allow requests from certain IP addresses.

- If you need IPv6 then you will want to enable the “File and Printer Sharing (Echo Request – ICMPv6-In)” rule, listed just below.

- After enabling the rule, the server should now respond to ping requests.
- For example, we have pinged my Windows Server 2022 VM at 192.168.162.185 from desktop before we enabled the rule and after we enabled the rule. Our initial requests timed out because Windows Server 2022 has inbound ICMP traffic disabled by default. Once the ICMP rule was enabled, the ping requests were successful and we validated that the change works.

It is easy to enable ping in Windows Server 2022, and being able to use ping as part of network troubleshooting is a quick and easy way to test connectivity. Allowing inbound ICMP traffic through the firewall will let you test connectivity and diagnose connectivity issues without losing necessary security controls.