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.
Translate a DNS entry to an IP address.
Here is the command output.
Optionally, use a filter to get only the desired property.
Here is the command output.
Translate a DNS entry to an IP address.
Here is the command output.
Optionally, use a filter to get only the desired columns.
Here is the command output.
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.
Create a file containing a list of DNS addresses.
In our example, we create a file named DNS in the root of drive C.
Translate all DNS entries to IP address.
Here is the command output.
Optionally, change the result order to show the IP address first.
Here is the command output.
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.