Powershell NSLOOKUP

The following PowerShell one liners give you hostname to IP or vice versa.

Hostname to IP:

[System.Net.Dns]::GetHostEntry(“server″)

IP to Hostname:

[System.Net.Dns]::GetHostEntry(“1.2.3.4″)
Posted on August 18, 2012 at 11:17 by simon · Permalink
In: Power Shell · Tagged with: , , , ,

Leave a Reply