Network, PowerShell, Server, Windows

Resolve DNS and IP Addresses with PowerShell

In this case we’re going to use the method GetHostAddresses of the Dns class of the Sytem.Net namespace.
For PowerShell 2.0 you can use following Windows PowerShell One Liners:

Name to IP Address (DNS Forward)

IP Address to Name (DNS Reverse)

As of PowerShell 3.0 you can use the method GetHostEntry() for both Forward and Reverse: As of PowerShell 4.0 you can use the Cmdlet Resolve-DnsName as well as for both Forward and Reverse: