[System.Net.Dns]::GetHostEntry("ip") returns host entry of another server [closed] [System.Net.Dns]::GetHostEntry("ip") returns host entry of another server [closed] powershell powershell

[System.Net.Dns]::GetHostEntry("ip") returns host entry of another server [closed]


I was not able to reproduce the problem (calling [System.Net.Dns]::GetHostEntry('unusedIP') gave me an exception).

If there is in fact an issue with your DNS configuration, it's not clear from the information we have, and it would be more appropriate to post it on ServerFault.

Is there any other clear code to do a reverse DNS lookup in .net / powershellscript which exactly works like nslookup ?

I wouldn't say it works exactly like nslookup but there is a cmdlet for that (be aware that it requires PowerShell 3+ and Windows 8/2012 or higher):

Resolve-DnsName 10.10.1.54