Windows Determine IP address from hostname

Addet at:Wed, Aug 21, 2019 Updated at:Sun, Sep 15, 2024

In this article I will show you how you can use PowerShell/cmd in Windows to determine the IP address of a computer in the network based on its name.

Let's get started - Determine IP address in Windows via Shell

To do this, press the key combination [Windows] + [R], type poswershell and enter the following in PowerShell.

$ ping -4 chaincheck-pc

This command performs a ping IPv4 (additional -4). The result is the IPv4 address of the target computer (hostname).

The second way to determine the IP address for the hostname is using the following syntax:

resolve-dnsname <PCNAME>

Resolve-DnsName only works in Windows PowerShell. In this example, the IP address for the PC name chaincheck-pc is determined. To do this, enter the following (without the $ sign).

$ resolve-dnsname chaincheck-pc

The host name has been resolved. The IP address for the PC name is shown on the bottom right under "IPAddress". In addition, the IP v6 addresses are also listed using Resolve-DnsName.