Home
Manage Your Code
Snippet: Get HostName for an IP Address (PowerShell)
Title: Get HostName for an IP Address Language: PowerShell
Description: Used to get the host name for an IP address from DNS. Views: 876
Author: Michael Wood Date Added: 7/23/2008
Copy Code  
$IP = '10.1.12.12'
[System.Net.Dns]::GetHostbyAddress($IP).HostName
Usage
You can type in the console directly and replace $IP with a string representing the IP, or you can include this in a bigger script.