powershell get ip address from hostname code example Example: powershell get ip from computer name $ips = [System.Net.Dns]::GetHostAddresses("yourhosthere")