Contents

How to get the hostname from an IP Address on Windows

This can be done using the standard ping command on Windows.

Use the -a or /a option which “Specifies reverse name resolution be performed on the destination IP address” which will provide a host-name if the reverse name resolution is successful.

ping -a w.x.y.z  

Where w,x,y,z are the numbers for your IPv4 address you want to get the host name for, this does not work for IPv6 address.

Run Example here:

/posts/get-hostname-with-ip-address-windows/ping-a-windows.png

Reference

ping on Microsoft Learn

Resolve host name from IP address