export forwarders

Hi Experts,
I have a new DNS running on win2008.
On the old DNS in win2003r2 I have dns forwarders installed.
is there a possibility to export the forwarders and import them to my new DNS server ?
Eprs_AdminSystem ArchitectAsked:
Who is Participating?
 
Chris DentConnect With a Mentor PowerShell DeveloperCommented:

Okay so, it's easy, but you need these two:

PowerShell 2: http://support.microsoft.com/kb/968930/en-gb
DnsShell (DNS Management Module for PowerShell): http://code.msdn.microsoft.com/dnsshell/

The first will be pre-installed if you have 2008 R2, otherwise you will need to upgrade PowerShell 1 to PowerShell 2 (PS 1 is pre-installed on 2008).

DnsShell is my management module, once you have it all you need do is this in the PowerShell prompt:


Import-Module DnsShell
$OldServer = "YourOldDnsServer"
$NewServer = "YourNewDnsServer"

Get-DnsZone -ZoneType Forwarder -Server $OldServer | New-DnsZone -Server $NewServer


If you want to test it on one use:


Get-DnsZone whateverzone -Type Forwarder | New-DnsZone -Server $NewServer


And please let me know if you have any questions about any of this.

HTH

Chris
0
 
Chris DentPowerShell DeveloperCommented:

Could do. I assume you have quite a lot of them then? And I assume you're talking about conditional forwarders?

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
yes right.
I have a lot of them.
In win2003 its called forwarders, when you select the DNS server in DNS window.

In 2008 when I open DNS and select the server, I have FORWARDERS and a folder called CONDITIONAL FORWARDERS.

Whats the difference ?
0
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

 
Chris DentPowerShell DeveloperCommented:

Nothing more than presentation. They simply decided that it should go in a different place in the GUI.

I have a toolset for this kind of thing, I just need to adjust it slightly so it can do this neatly. I'll be right back :)

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
I don't know how to export the forwarders.
Can you explain it in detail maybe ?
0
 
Chris DentPowerShell DeveloperCommented:

This pulls the Forwarders from the specified server:


Get-DnsZone -ZoneType Forwarder -Server "ServerName"


Piping the output from that into the New-DnsZone CmdLet will have it set up the forwarders (in this case) on the other server. The New-DnsZone CmdLet accepts input like this:


New-DnsZone -ZoneName "SomeZone.com" -ZoneType Forwarder -MasterServer "1.2.3.4", "2.3.4.5"


However, since I'm suggesting you use the piped version you don't need to type in each of the parameters.

You can use other tools such as dnscmd if you prefer, but it's a lot more effort to get from the output there to creation of the forwarders on the other server. To extract them using dnscmd you would use:


dnscmd OldServer /EnumZones /Forwarder


You might pull apart the output from that in Excel (or similar) and construct the commands to create the forwarders on the new server using:


dnscmd NewServer /ZoneAdd Name /Forwarder MasterIP1, MasterIP2


All entirely possible, but so much work :)

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
ok, what I have to install on the old server win2003 ?
And what on the new server win2008 ?
0
 
Chris DentPowerShell DeveloperCommented:

You can install PowerShell 2 and download the module above on either server, or your workstation for that matter. Doesn't matter where you put it really.

However, you only need to install it in one place. My personal preference is to do stuff like this on my workstation, leaving my servers nice and clean :)

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
I cannot download the module.

Error symbol      The Windows Live Network is unavailable from this site for one of the following reasons:

    * This site may be experiencing a problem
    * The site may not be a member of the Windows Live Network

You can:

    * You can sign in or sign up at other sites on the Windows Live Network, or try again later at this site.
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
Do you have another solution to get the module ?
0
 
Chris DentPowerShell DeveloperCommented:

Sure, you can download it from my site here:

http://www.indented.co.uk/wp-content/uploads/2010/08/DnsShell.zip

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
Where is module folder to put the module ?
Cannot import the module.
0
 
Chris DentPowerShell DeveloperCommented:

Under "My Documents" / "Documents" create a folder called "WindowsPowerShell", then beneath that another called "Modules". The zip file should be exported there, including the DnsShell folder.

Restart the PowerShell prompt and it should let you use Import-Module.

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
Please can you exactly write down, what I have to enter in the dnsshell ?
Now its not working:

Comand after comand please.
0
 
Chris DentPowerShell DeveloperCommented:

Exactly where is it breaking? Because *everything* you need to type is above. If it's failing I need to know how.

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
scripts are not allowed on my system.
0
 
Chris DentPowerShell DeveloperCommented:

Ahh okay, in that case run:


Set-ExecutionPolicy RemoteSigned


It's because the module is not signed with a certificate, I'll get around to it one day.

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
ok thanks.
But I think I found another simpler way.
We just extracted the registry from the old zones to the new server.

Now we have all entries in the conditional forwarders.
But what are the difference from the all old forwarders to the new ? Because in 2008 I have both , FORWARDERS and CONDITIONAL FORWARDERS ?
0
 
Chris DentConnect With a Mentor PowerShell DeveloperCommented:

Forwarders are Global, Conditional Forwarders are a type of zone.

2003 doesn't really differentiate between the two, putting everything under the Forwarders tab. 2008 does, it maintains separate areas for each as you've seen.

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
But do think it is ok to have now all in conditional forwarders and not in global ?

0
 
Eprs_AdminSystem ArchitectAuthor Commented:
Here is my solution for it :

How to migrate DNS forwarders from Win2003 to Win2008      

Source server:
Open application registry editor "regedit"
Go to hive key" HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones
Then go to the top menu: "File, Export

Save the file temporay location.

Target server:
Open application registry editor "regedit"
First nake a FULL backup of the actual registry
Then go to the top menu: "File, Import
Select the file that you exported of the source server.
Then restart server.
0
 
Chris DentPowerShell DeveloperCommented:

> But do think it is ok to have now all in conditional forwarders and not in global ?

Yes. As I said above it's a presentation change, they changed how it looked, it doesn't effect how it actually works.

Chris
0
 
Eprs_AdminSystem ArchitectAuthor Commented:
Ok my friend, then all is solved now !
Thanks a lot.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.