Apr 2 2012 12:33PM GMT
Posted by: Richard Siddaway
DNS, PowerShell, WMI
Finding the primary name of a DNS alias record
Posted by: Richard Siddaway
A forum question asked how to find the primary name from an alias or CNAME record.
Get-WmiObject -Namespace 'root\MicrosoftDNS' -Class MicrosoftDNS_CNAMEType ` -Filter "ContainerName = 'Manticore.org'" -ComputerName server02 | select @{N='Alias'; E={$_.Ownername}}, Primaryname
use the MicrosoftDNS_CNAMEType class. Filter on the domain ie containername. ComputerName holds the DNS server name.
Change OwnerName to Alias in a select calculated field




