3

We are migrating just under 200 domains from a DNS server at another location (we have remote desktop access) to a server at our location. Is there a simple, scripted way of doing all of the zone transfers at once? Each server is Windows 2003, and the domains are internet domains, not Active Directory stuff.

3 Answers 3

4

Zow! Sounds like a lot of fun.

You could use the DNSCMD utility from the Windows Support Tools to enumerate the zones, then export the zones using the /ZoneExport parameter, then import them with the /ZoneAdd parameter. It shouldn't be too bad of a script.

The export is a little quirky, because it exports to the %windir%\system32\dns directory on the server hosting the zones.

@echo off
set SRC=source-server
set DST=destination-server

for /f "usebackq delims= " %%i in (`dnscmd %SRC% /EnumZones ^| find "Primary"`) do call :DOZONE %%i
goto end

:DOZONE
dnscmd %SRC% /ZoneExport %1 %1.dns
dnscmd %DST% /ZoneAdd %1 /Primary /file \\%SRC%\C$\Windows\System32\DNS\%1.dns

:end

Admittedly, I don't have a scratch DNS server or two at hand, but the syntax should be pretty close. I tested everything but the "ZoneAdd".

0

No idea if there's a script for doing that, but a nice simple way of moving DNS zones to another server is making the new server a secondary for the various zones then making it the primary once info is transferred across. This is nice and "cross platform" and therefore guaranteed to work pretty much no matter what.

Look at dnscmd.exe to do this at the command line, so you can script creating the secondaries.

0

You need to copy the the %SystemRoot%\System32\DNS folder from source DNS server to dstination and export/importa a couple of registry keys

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DNS\Zones HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones

Simply copying the DNS folder won't work, at least that was my case for a destination w2k8 DNS server.+

You can see al the process from the this MS KB

How to move Windows 2000 DNS zones to another Windows 2000-based server

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .