Monday, June 4, 2018

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

2 comments:

  1. Hi, nice post but where is the actual script. I don't see it attached anywhere. thanks

    ReplyDelete
  2. windows server 2008, Standard Edition taking on the bulk of network services, the Enterprise Edition is really focused on server systems that require extremely large-scale processing and memory capabilities as well as clustering or Active Directory Federation Services.

    ReplyDelete

Note: Only a member of this blog may post a comment.