Would you like to learn how to translate a hostname to an IP address using Powershell? In this tutorial, we are going to show you how to use Powershell to translate a list of DNS addresses to IP on a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Translate DNS to IP address

As an Administrator, start a new POWERSHELL command-line prompt.

Windows 10 - powershell elevated

Translate a DNS entry to an IP address.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, use a filter to get only the desired property.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Translate a DNS entry to an IP address.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, use a filter to get only the desired columns.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we translated a DNS hostname to an IP address using Powershell.

Congratulations! You are able to resolve a DNS address to an IP address using Powershell.

Tutorial Powershell - Translate a list of DNS addresses to IP

As an Administrator, start a new POWERSHELL command-line prompt.

Windows 10 - powershell elevated

Create a file containing a list of DNS addresses.

Copy to Clipboard

In our example, we create a file named DNS in the root of drive C.

Translate all DNS entries to IP address.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Optionally, change the result order to show the IP address first.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we translated a list of DNS hosts to IP addresses using a Powershell script.

Congratulations! You are able to translate a list of DNS entries to IP addresses using a Powershell script.