Category Archives: Scripting

Resolving IP to Hostname with PowerShell

Getting the hostname from an IP address (or vice versa) is no great magic, and can be done easily with PowerShell, by simply leveraging .Net to do the work. We’ve all done something like this to get resolve an IP address: [System.Net.Dns]::GetHostEntry(“69.69.95.133”).HostName Or this to get an IP address from a hostname: [System.Net.DNS]::GetHostAddresses(“www.fortypoundhead.com”).IPAddressToString But did you ever notice… Read More »