Backup/Restore all DNS zones

These scripts backup and restore all DNS zones on specific DNS server (source).
The backup script uses the Powershell cmdlet get-wmiobject to list the DNS zone present in the WMI database and then export each zone using the dnscmd tool.
The restore script uses the dnscmd tool to create the zone and his content.

Useful link on how to export and import AD integrated zone files.

Backup script :

 

Restore script :

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 : XYZScripts.com
%d bloggers like this: