Manage reverse DNS zones with Powershell

Manage reverse DNS zones with Powershell

Manage reverse DNS zones with Powershell

The script is a complete tool that will perform the following tasks:

  • list the A records in the domain name defined in the variable $dnsDomainName
  • for each record, check if the reverse zone exist. If not, ask to create the reverse zone (choice between domain and forest-wide replication scope)
  • if the A record does not have a valid reverse record:
    • check if the A record is reachable (ping ok/nok)
    • if the A record is available (ping ok), create the PTR record in the correct zone
    • if the A record is not available (ping nok), the PTR record creation is skipped

The script has been tested successfully in a Windows 2012R2 infrastructure (Active Directory + DNS).


My Powershell script categories

Leave a Reply

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