Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.dns
Thread: Update missing PTR records

HTVi
TV Discussion Newsgroups

Update missing PTR records
Bob 6/12/2007 2:13:00 PM
The reverse zone for an address range was not created at the start. I need to
programatically update the reverse zone if possible from the existing forward
zone, any suggestions?
Re: Update missing PTR records
"Herb Martin" <news[ at ]learnquick.com> 6/12/2007 7:36:02 PM

"Bob" <Bob[ at ]discussions.microsoft.com> wrote in message
news:06AF6421-369C-4F91-BF13-1F9AD385D78E[ at ]microsoft.com...
[Quoted Text]
> The reverse zone for an address range was not created at the start. I need
> to
> programatically update the reverse zone if possible from the existing
> forward
> zone, any suggestions?

There is NO relationship between forward and reverse zones in DNS
itself -- the only such relationship is in the minds of admins like us.

So you will need to script this if you wish to do something like this,
perhaps
using DNSCmd to first dump the list of forward records and then (after
any post-processing) using that list to script in the changes to the reverse
zone.

You can use /enumrecords to get the list of records:

dnscmd /enumrecords learnquick.com .

(that's a "."-dot on the end there since you must give the starting node)

Problem is this gets ALL records so you have to send it through Grep,
Awk, Sed, Perl, etc or edit the result by hand:

I don't usually use FindStr (prefering a good Grep or Perl but I have
approximated the FindStr to strip the unnecessary lines (only close
because FindStr is giving me unpredictable results):

dnscmd /enumrecords learnquick.com . | findstr /r "^[a-z].* +A +[0-9.]+$"

Once you have the list of records you can pump them through a DNSCmd
/RecordAdd with one (or two) for..in..do loops. You will need two if you
don't have another way to differentiate dynamic records (with an Aging:
parameter) from Static records AND if you want to check both.


--
Herb Martin, MCSE, MVP
http://www.LearnQuick.Com
(phone on web site)


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen