以管理员身份启动 cmd.exe:
启用 ping:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
禁用 ping:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=block
标签:禁止,protocol,netsh,windows,ping,echo,firewall,any From: https://www.cnblogs.com/nanfei/p/17010929.html