Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about dnscmd /enumrecords, however what I want to do is export all records from every single zone housed on this server.

I was hoping there was a simple recursive function to do this. We have 100s of DNS zones on our server, so I'm not about to run a 'dnscmd /enumrecords' manually for all of them.

share|improve this question

I have used this steps: Windows DNS Export Import

I don't have a lot of zones but quite a lot of registries on each one.

UPDTATE (solution explanation)


  1. Export all your zones for your own safety:

    C:\> dnscmd servername /enumrecords zonename @ /type A /detail > c:\filename.txt

  2. Export the registry records:

    Run REGEDIT and navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DNS Server\Zones
    (Right-Click the key ZONES and export to a .reg file).


    C:\> regedit /e c:\dns.reg "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\DNS Server"

  3. Copy *.dns from: %windir%\system32\dns

  4. Transfer all files t the new (target) server


  1. Create a test zone such as The DNS server needs one zone created, but you can remove it after the import.

  2. Copy the *.dns files into %windir%\system32\dns on the new server

  3. Double click on the .reg file you created to load all the zones into the new server’s registry
    (For Windows 2008: Right click the reg. file and run as Administrator)

  4. Restart the DNS Server service

share|improve this answer
We would prefer answers which describe the process, rather than simply linking to another document which might get deleted, moved or modified afterwards. – EightBitTony Oct 23 '12 at 22:22
@EightBitTony I have updated to have the link and the full answer. – Alexandre Marcondes Nov 4 '13 at 13:36

Check out the DNSShell plugin for PowerShell.

share|improve this answer
I found the solution, very simple. dnscmd /zoneexport gets all the records in a zone into a text file. – Bob Jul 28 '11 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.