Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > DNS Server > Re: script to change zone transfer settings

Reply
Thread Tools Display Modes

Re: script to change zone transfer settings

 
 
Chris Dent
Guest
Posts: n/a

 
      04-28-2010
mmccaws2 wrote:
> On Apr 28, 9:17 am, mmccaws2 <mmcc...@comcast.net> wrote:
>> Hi Guys
>>
>> I have a DNS secondary provider that uses an zone transfer server to
>> upload that is not listed in the name server list. I have over 50
>> zones to make the change on and would rather make the changes using a
>> script. The zone transfer information is stored in registry under
>> hklm>SOFTWARE>Microsoft>Windows NT>CurrentVersion>DNS Server>Zones
>>
>> under each zone file name.
>>
>> Of course this means that all the name servers ip addresses need to be
>> listed. Could you point me to a script examples that I may use.
>>
>> Thanks ahead

>
> i did find this
>
> dnscmd /ZoneResetSecondaries <zonename> /SecureList <ipaddress>
> <ipaddress> ...
>
> can I use a looping batch file to enter these?


Yes, you can indeed.

Perhaps the simplest way to hack a batch file together is with Excel.

Run this to get a list of zones:

dnscmd /EnumZones /Primary

Paste the zone list into a column in Excel.

In the column to the left, add "dnscmd /ZoneResetSecondaries", and in
the columnn to the right add "/SecureList", then the new IP addresses in
the next column, and finally the Notify options if you wish to set those
in the columns after that.

A bit of copy down for those commands to fill up then sheet then Copy
and paste the lot from Excel back into Notepad, save as .bat and you're
all set.

If you prefer VbScript it is entirely possible to deal with this using
the WMI interface.

And if you use PowerShell I have a DNS module which wraps up the
majority of the WMI interface and should allow a great deal of
flexibility. Something like...

Get-DnsZone | ?{ $_.ZoneType -eq "Primary" } | %{
Set-DnsZoneTransfer -Identity $_.Identity `
-ZoneTransfer List -SecondaryServers 1.2.3.4, 2.3.4.5 }

Whatever you like best and find easiest

HTH

Chris
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: maintaining personal settings in domain change Ace Fekay [MVP-DS, MCT] Windows Server 1 04-17-2010 04:56 PM
Re: maintaining personal settings in domain change Ace Fekay [MVP-DS, MCT] Windows Small Business Server 1 04-17-2010 04:56 PM
How to transfer songs, videos, photos and playlist from iPod/iPhone/iTouch to PC? zzyjetty521 Windows Vista Music, Pictures and Video 0 10-29-2009 09:46 AM
Windows Easy Transfer Companion MICHAEL Windows Vista Performance 7 06-23-2007 03:55 AM
Not So Easy Transfer using Flash Drive Lance Otis Windows Vista Installation 8 03-08-2007 09:14 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59