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.


Revision #1
Created 2024-10-16 03:52:52 UTC by Tiffanie BOREUX
Updated 2024-10-16 04:04:17 UTC by Tiffanie BOREUX