Migrate 200 Domains from Win2003 DNS server to another

Solution 1:

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".