Enable ICMP (Ping) on Windows Server
How to enable ICMP echo requests on Windows Server using PowerShell and Command Prompt via Windows Firewall rules.
By default, Windows Server blocks ICMP echo requests (ping) on the Public network profile through Windows Defender Firewall. This guide shows you how to enable ICMP using either PowerShell or Command Prompt.
Enabling ICMP on a public-facing interface may expose your server to network reconnaissance. Consider enabling it only on Domain or Private profiles if your server is internet-facing.
Prerequisites
- Administrator privileges on the Windows Server instance
- Access to PowerShell or Command Prompt (run as Administrator)
Enable ICMP
Open PowerShell as Administrator
Right-click the Start menu and select Windows PowerShell (Admin) or Terminal (Admin).
Enable ICMPv4 (Ping) inbound
Run the following command to create a firewall rule that allows inbound ICMPv4 echo requests:
To scope the rule to a specific network profile, replace -Profile Any with -Profile Domain, -Profile Private, or -Profile Public.
Reverting the Change
To remove the ICMP rules and restore the default blocked state:
Testing Connectivity
Once the rules are applied, test from another machine on the network:
A successful response confirms ICMP is now enabled.