Migrating Windows DNS Server
by Travis on Dec.09, 2018, under Tech Stuff
Ever needed to migrate a non-AD integrated Windows DNS Server to another instance of Windows? I found myself in the situation to do so this weekend so I figured I’d share the process for reference.
From the source server:
- Create a folder for storing the migration files. (ex. c:\temp\dnsgmig)
- From an elevated command prompt, execute the following commands:
- ‘reg export “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Parameters” c:\temp\dnsmig\dns-params.reg
- ‘reg export “HKEY_LOCAL_MACHINE\System\CurrentVersion\DNS Server” c:\temp\dnsmig\dns-version.reg
- ‘reg export “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Parameters” c:\temp\dnsmig\dns-params.reg
- Modify dns-params.reg and change “PreviousLocalHostname” to the fqdn of your new DNS server. If you using the same name, skip this step.
- Copy the folder c:\windows\system32\dns to c:\temp\dnsmig\
Copy the source folder (c:\temp\dnsmig) to the destination server. (example will use the same folder name)
- From an elevated command prompt, execute the following command:
- Stop-Service DNS
- Click to import your two registry files, dns-params.reg and dns-version.reg. You’ll be prompted each time to confirm you want to import the information. Click ‘Yes’.
- Copy all of the files from c:\temp\dnsmig\dns to c:\windows\system32\dns
- From an elevated command prompt, execute the following command:
- Start-Service DNS
You should now be up and running.