I’m performing a reverse dns lookup but I only get the name and not the IP used in my results. I would like to have both so I can match one to one. Can you help?
#Reverse IP Lookup
$IP1 = “10.11.162.15”,
$PC = foreach ($p in $IP1)
[System.Net.Dns]::GetHostEntry($p).HostName | select-object $p, $p.hostname
My select object statement does not appear to be bringing in the data I need and it appears to be from the reverse dns lookup command I’m using.