Microsoft DNS zones backup

Microsoft DNS zones backup

This script uses the DNS powershell cmdlets available since Windows 2012. It exports the DNS zones hosted on a Microsoft DNS servers. First, a csv file is created (csv file called _-_domain_info.csv) with the following zone details:

  • NotifyServers
  • SecondaryServers
  • AllowedDcForNsRecordsAutoCreation
  • DistinguishedName
  • IsAutoCreated
  • IsDsIntegrated
  • IsPaused
  • IsReadOnly
  • IsReverseLookupZone
  • IsShutdown
  • ZoneName
  • ZoneType
  • DirectoryPartitionName
  • DynamicUpdate
  • IsPluginEnabled
  • IsSigned
  • IsWinsEnabled
  • Notify
  • ReplicationScope
  • SecureSecondaries
  • ZoneFile
  • PSComputerName

After that each zone is exported to a csv file with the following properties :

  • DistinguishedName
  • HostName
  • RecordClass
  • RecordData
  • RecordType
  • Timestamp
  • TimeToLive
  • PSComputerName

The cmdlet Set-DnsServerResourceRecord can be used to restore records by parsing the csv files


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By :
%d bloggers like this: