@PINGR[host[,timeout[,packetsize[,ttl[,type]]]]] : Returns the address of the host responding to the PING (ICMP ECHO) request.


host is the IP address or name.

timeout is the maximum number of seconds to wait (default is 60).

packetsize (optional) is the size of the data packet sent to the host in the ping request (default is 64). The minimum packet size is 12 bytes, and the maximum is 65520 bytes.

ttl (optional) is the time to live (default is the TTL value of the underlying TCP/IP subsystem).

type (optional) is the ICMP service type (default is 8).


The host address returned by @PINGR may or may not be the host specified in the first argument.


@PINGR supports either IPv4 or IPv6 addresses. IPv6 requires an elevated session.


A negative value indicates an error. If the request times out, @PINGR returns -1. An unreachable host returns -2. An invalid address returns -3.




echo %@pingr[microsoft.com]