Showing posts with label dns. Show all posts
Showing posts with label dns. Show all posts

Wednesday, August 4, 2010

Get alias cname hostname DNS using powershell

Well, just a way in powershell to know real hostname alias (CNAME)


$computername = [System.Net.Dns]::GetHostByName("youralias")
Write-Host $computername.HostName.substring(0,$computername.HostName.IndexOf("."))