Q
uick and easy Powershell script to resolve servers in a text document to ip addresses:
I’m using h:book1.txt as my source in this case, change this for the textfile you wish to query.
$servers =@()
$servers += get-content h:book1.txt
foreach ($server in $servers){
$ip = [System.Net.Dns]::GetHostAddresses(“$server”)
write-host $server – $ip
}
Voila! (this will also work in reverse)


