O R G A N I C / F E R T I L I Z E R: enumerating dns records with powershell

Jun 22, 2012

enumerating dns records with powershell

here's a way to list dns records with powershell going through wmi. keep in mind the dns class does not appear to support wildcards. :(

get-wmiobject -ComputerName servername -Namespace root\microsoftDNS -Class MicrosoftDNS_ResourceRecord -Filter "domainname='mydomain'" | select textrepresentation
 

i haven't figured out how to loop through subdomains and dump them out yet. :/ it's a start. hopefully you guys have something better you can share.