PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > ms.public.win2000.dns > adding a record to many zones
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
adding a record to many zones

Réponse
 
LinkBack Outils de la discussion
Vieux 04/12/2006, 20h28   #1
NoBoDy
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut adding a record to many zones

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



  Réponse avec citation
Vieux 05/12/2006, 06h51   #2
Ace Fekay [MVP]
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: adding a record to many zones

In news:%230qHTp9FHHA.4652@TK2MSFTNGP04.phx.gbl,
NoBoDy <NoWaY@NoWaY.NoWaY> 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...


  Réponse avec citation
Vieux 05/12/2006, 13h20   #3
Herb Martin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: adding a record to many zones

"NoBoDy" <NoWaY@NoWaY.NoWaY> wrote in message
news:%230qHTp9FHHA.4652@TK2MSFTNGP04.phx.gbl...
> 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 / 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" <NoWaY@NoWaY.NoWaY> wrote in message
news:%230qHTp9FHHA.4652@TK2MSFTNGP04.phx.gbl...
> 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
>
>
>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 00h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13035 seconds with 11 queries