Find the Missing/Mismatch or Duplicate DNS Forward and Reverse Records

I recently need to check the DNS records for one of my customer’s DNS server. It’s more than 500+ records to verify that the ‘A’ and ‘PTR’ records are updated properly and which records are missing. Most of the online scripts I found only check for single PTR records. So finally, I need to get my hands dirty, spending a few hours in powershell to make a script the can verify the relationship between forward and reverse records in local or remote DNS servers. Powershell 4.0 is needed to run the script. I won’t explain in details here. You can just use get-help in my script to check how it works. The script & sample screenshots are attached.
On Windows DNS server, you can run the script directly and it will enumerate all ‘A’ records and find the missing/mismatch PTR records.
To query against the linux DNS servers, create the list of hostnames to query and run the script with -FilePath option.
For more help, type Get-Help .\Verify_DNS_Forward_Reverse_Record_Advanced.ps1

See the explanation of each columns is in script help section.

 Fig-1: Query Records from another DNS server
 Fig-2: Query Records from Local DNS server

You can download my script here.

One thought on “Find the Missing/Mismatch or Duplicate DNS Forward and Reverse Records”

Leave a Reply

Your email address will not be published. Required fields are marked *