DnsServer module: setup and commands
Documentation: Microsoft Learn
Query DNS zones and records with Get-DnsServerZone and Get-DnsServerResourceRecord before changing forwarders, aging or scavenging.
Getting it
Available on any DNS server, and on an admin workstation once the RSAT DNS tools are installed with Add-WindowsCapability -Online -Name Rsat.Dns.Tools.
Examples
Show reference output
Show reference output
What it is for
Use it when the job is to change or audit what a DNS server holds rather than to resolve a name. It fits zone inventories, stale record cleanup, and confirming that conditional forwarders point where the design says they should.
Typical tasks
- Inventory forward and reverse lookup zones
- Export A and CNAME records for a zone
- Audit forwarders and root hints
- Check aging and scavenging settings
- Add or remove a record during a cutover
- Compare zone contents between two servers
Check the installed version
Compare the module path and version with the session used by your scheduled task or automation account. Use it when the job is to change or audit what a DNS server holds rather than to resolve a name. It fits zone inventories, stale record cleanup, and confirming that conditional forwarders point where the design says they should.