How to resolve hostname/IP with PowerShell

Hello,

A quick tick to resolve hostname/IP with PowerShell with the System.Net.DNS .net class :

[System.Net.DNS] | Get-Member -Static

This will display all static methods available with that kind of object.

Let’s try some of them :

System.Net.DNS-HostAddress

System.Net.DNS-HostEntry-IP

I let you check the MSDN link above, some of those methods are Obsolete.

 

Leave a Reply