Skip to main content

Get all DNS records in a specified zone in a Specific DNS Server

You can easily retrieve DNS records from a specific DNS server using a simple PowerShell command.


Get-DnsServerResourceRecord -ComputerName [DNS_SERVER] -ZoneName [ZONE_EXTENSION] -RRType [A|AAAA|CNAME|…]

# For example:
Get-DnsServerResourceRecord -ComputerName DC01 -ZoneName example.com -RRType CNAME

In the example above, the command queries the DNS server DC01 to retrieve all CNAME records within the example.com DNS zone.

This method allows you to specify the DNS record type (A, AAAA, CNAME, etc.) and zone name, making it an efficient way to manage and troubleshoot DNS settings on your network.