PC Review


Reply
Thread Tools Rate Thread

adding a record to many zones

 
 
NoBoDy
Guest
Posts: n/a
 
      4th Dec 2006
Hello all

I am trying to add a dns record to certain zones running on a dns server.

By using 'dnscmd . /recordadd local.dom @ mx 10 smtp' I can add a mx record
of smtp to the local.dom zone.

But how can I expand this command (or use other commands) to add 1 dns
record to hundreds of zones, maybe a list of zones contained in a file or
just to zones containing certain characters.

Regards



 
Reply With Quote
 
 
 
 
Ace Fekay [MVP]
Guest
Posts: n/a
 
      5th Dec 2006
In news:%(E-Mail Removed),
NoBoDy <(E-Mail Removed)> stated, which I commented on below:
> Hello all
>
> I am trying to add a dns record to certain zones running on a dns
> server.
> By using 'dnscmd . /recordadd local.dom @ mx 10 smtp' I can add a mx
> record of smtp to the local.dom zone.
>
> But how can I expand this command (or use other commands) to add 1 dns
> record to hundreds of zones, maybe a list of zones contained in a
> file or just to zones containing certain characters.
>
> Regards


You'll need to be creative with a little scripting (bat file or otherwise).

Some possible su ggestions, unless someone here in the groups specifically
writes a snippet of code for you:

http://cwashington.netreach.net/depo/view.asp?Index=967
http://www.informit.com/articles/art...&seqNum=3&rl=1
http://jdhitsolutions.blogspot.com/

I like CWashington. His site was down for awhile, but it's back up again.
Lot;s of goodies there. You can also search Google for more. Here is what I
found:
http://www.google.com/search?hl=en&l...scmd+scripting

--
Ace
Innovative IT Concepts, Inc (IITCI)
Willow Grove, PA

This posting is provided "AS-IS" with no warranties or guarantees and
confers no rights.

Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSE+I, MCT, MVP
Microsoft MVP - Directory Services
Microsoft Certified Trainer

Having difficulty reading or finding responses to your post?
Instead of the website you're using, I suggest to use OEx (Outlook Express
or any other newsreader), and configure a news account, pointing to
news.microsoft.com. This is a direct link to the Microsoft Public
Newsgroups. It is FREE and requires NO ISP's Usenet account. OEx allows you
to easily find, track threads, cross-post, sort by date, poster's name,
watched threads or subject.
It's easy:

How to Configure OEx for Internet News
http://support.microsoft.com/?id=171164

Infinite Diversities in Infinite Combinations
Assimilation Imminent. Resistance is Futile
"Very funny Scotty. Now, beam down my clothes."

The only constant in life is change...


 
Reply With Quote
 
Herb Martin
Guest
Posts: n/a
 
      5th Dec 2006
"NoBoDy" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello all
>
> I am trying to add a dns record to certain zones running on a dns server.
>
> By using 'dnscmd . /recordadd local.dom @ mx 10 smtp' I can add a mx
> record of smtp to the local.dom zone.
>
> But how can I expand this command (or use other commands) to add 1 dns
> record to hundreds of zones, maybe a list of zones contained in a file or
> just to zones containing certain characters.
>



Batch: For /f ... in (filename) ... do ...

Get zone list into a file (using DNSCMD if you wish): zones.txt
(dnscmd /enumzones then clean top, bottom, and remove unneeded
zones, e.g., reverse etc.)

Then:

for /f %a in (zones.txt) do dnscmd . /recordadd %a @ mx 10 smtp

(Assuming your original command worked -- I didn't test this but
just typed it from memory and your example.)

Technically it could be done in one command but you can check
for /help for that if you wish -- and it is ugly because the result
of DNSCmd /enumzones has to be either parsed, or cleaned up
in a text editor.



--
Herb Martin, MCSE, MVP
Accelerated MCSE
http://www.LearnQuick.Com
[phone number on web site]

"NoBoDy" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello all
>
> I am trying to add a dns record to certain zones running on a dns server.
>
> By using 'dnscmd . /recordadd local.dom @ mx 10 smtp' I can add a mx
> record of smtp to the local.dom zone.
>
> But how can I expand this command (or use other commands) to add 1 dns
> record to hundreds of zones, maybe a list of zones contained in a file or
> just to zones containing certain characters.
>
> Regards
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
adding a new record at subform should update an existing record (not create new record) Mark Kubicki Microsoft Access Form Coding 1 16th Jan 2009 08:34 AM
Adding Reverse Lookup Zones dave Admin Microsoft Windows 2000 DNS 11 3rd Mar 2006 04:27 AM
adding time zones to formatting =?Utf-8?B?dGpi?= Microsoft Excel Worksheet Functions 0 17th Feb 2005 03:39 PM
OL2002 - Adding Multiple Time Zones Jack Gerace Microsoft Outlook Calendar 1 19th May 2004 11:17 PM
Deleting a record follow by Adding a record will result in getting wrong Index Key problem =?Utf-8?B?TGlzYSBKb25lcw==?= Microsoft VB .NET 0 30th Apr 2004 06:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 AM.