Skip to content

Instantly share code, notes, and snippets.

@cheynewallace
Created April 1, 2014 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cheynewallace/9925130 to your computer and use it in GitHub Desktop.
Save cheynewallace/9925130 to your computer and use it in GitHub Desktop.
Export DNS Zone As Text File Info To %windir%\System32\dns. Takes single zone name as parameter
@ECHO OFF
REM Run this with: dns_export.bat <your_zone_name>
ECHO ###############################
ECHO ## REMOVING OLD ZONE EXPORT ##
ECHO ###############################
del C:\Windows\System32\dns\%1.txt
ECHO
ECHO ###########################################
ECHO ## EXPORTING %1 ZONE DNS CONFIGURATION ##
ECHO ###########################################
dnscmd localhost /ZoneExport %1 %1.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment