PowerShell: IP and Host Name Lookups (nslookup) « Lange's Tech Musings

PowerShell: IP and Host Name Lookups (nslookup) « Lange's Tech Musings

瀏覽:1310
日期:2024-05-12
10 April 2013 at 17:18 If you mean the hostname of the machine you are on, $Env:Computername should work. If you want to get the hostname from the IP, you can use: $IP = “192.168.0.1” [System.Net.Dns]::GetHostEntry($IP).hostname...看更多