PowerShell: list the records of a Windows DNS zone
Use Get-DnsServerResourceRecord to list the records of a zone on a Windows DNS server.
To list the DNS records of a zone hosted on a Windows DNS server, use the Get-DnsServerResourceRecord cmdlet from the DnsServer module.
Get-DnsServerResourceRecord -ComputerName dnsserver01 -ZoneName "contoso.com"
-ComputerName: the DNS server to query (defaults to the local machine).-ZoneName: the zone whose records you want to list.
The command returns all records of the zone (A, CNAME, NS, SOA, etc.). The DnsServer module comes with the RSAT administration tools (or the DNS Server role).