LLI Wiki — My Digital Knowledge Base

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"

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).

Mastodon LLIMastodon SocialFosstodon