How to use dnscmd to add a record to a domain within a zone?

G

Guest

Guest
Archived from groups: microsoft.public.win2000.dns (More info?)

Has anyone used the dnscmd command to do a recordadd to a domain that is part
of your root zone? I want to script the process for adding DNS records to
some child domains contained in the forward lookup zone. For example:

Parent domain and forward look up zone: test.lab
Child domain: child.test.lab
DNS server hostname: dnsserver
Test.lab system: NewBox
Child.test.lab system: ChildNewBox

Now if I want to use dnscmd to add a record to test.lab the command is easy:

C:\dnscmd dnsserver /recordadd test.lab NewBox A 10.0.0.101

This command completes succesffully and I can find the record in the zone.

But when I try the following command to add a record to the domain "child"
in the zone "test.lab":

C:\dnscmd dnsserver /recordadd child.test.lab ChildNewBox A 10.0.0.102

I receive the follwoing error message:

Command failed: DNS_ERROR_ZONE_DOES_NOT_EXIST 9601 (00002581)

Now this makes sense. There is no zone child.test.lab, but I can't find an
example of how to add the record to the domain "child" that is part of the
zone "test.lab" or even how to list the records within the domains that are
within the zone.

Any ideas? Much thanks in advance!
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.dns (More info?)

"" wrote:
> Has anyone used the dnscmd command to do a recordadd to a
> domain that is part
> of your root zone? I want to script the process for adding DNS
> records to
> some child domains contained in the forward lookup zone. For
> example:
>
> Parent domain and forward look up zone: test.lab
> Child domain: child.test.lab
> DNS server hostname: dnsserver
> Test.lab system: NewBox
> Child.test.lab system: ChildNewBox
>
> Now if I want to use dnscmd to add a record to test.lab the
> command is easy:
>
> C:dnscmd dnsserver /recordadd test.lab NewBox A 10.0.0.101
>
> This command completes succesffully and I can find the record
> in the zone.
>
> But when I try the following command to add a record to the
> domain "child"
> in the zone "test.lab":
>
> C:dnscmd dnsserver /recordadd child.test.lab ChildNewBox A
> 10.0.0.102
>
> I receive the follwoing error message:
>
> Command failed: DNS_ERROR_ZONE_DOES_NOT_EXIST 9601
> (00002581)
>
> Now this makes sense. There is no zone child.test.lab, but I
> can't find an
> example of how to add the record to the domain "child" that is
> part of the
> zone "test.lab" or even how to list the records within the
> domains that are
> within the zone.
>
> Any ideas? Much thanks in advance!

Try:

dnscmd dnsserver /recordadd test.lab. ChildNewBox.child.test.lab. A
10.0.0.102


Cheers,

--
Posted using the http://www.windowsforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.windowsforumz.com/DNS-cmd-add-record-domain-zone-ftopict551444.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.windowsforumz.com/eform.php?p=1747326
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.dns (More info?)

"Jorge_de_Almeida_Pinto" wrote:

> "" wrote:
> > Has anyone used the dnscmd command to do a recordadd to a
> > domain that is part
> > of your root zone? I want to script the process for adding DNS
> > records to
> > some child domains contained in the forward lookup zone. For
> > example:
> >
> > Parent domain and forward look up zone: test.lab
> > Child domain: child.test.lab
> > DNS server hostname: dnsserver
> > Test.lab system: NewBox
> > Child.test.lab system: ChildNewBox
> >
> > Now if I want to use dnscmd to add a record to test.lab the
> > command is easy:
> >
> > C:dnscmd dnsserver /recordadd test.lab NewBox A 10.0.0.101
> >
> > This command completes succesffully and I can find the record
> > in the zone.
> >
> > But when I try the following command to add a record to the
> > domain "child"
> > in the zone "test.lab":
> >
> > C:dnscmd dnsserver /recordadd child.test.lab ChildNewBox A
> > 10.0.0.102
> >
> > I receive the follwoing error message:
> >
> > Command failed: DNS_ERROR_ZONE_DOES_NOT_EXIST 9601
> > (00002581)
> >
> > Now this makes sense. There is no zone child.test.lab, but I
> > can't find an
> > example of how to add the record to the domain "child" that is
> > part of the
> > zone "test.lab" or even how to list the records within the
> > domains that are
> > within the zone.
> >
> > Any ideas? Much thanks in advance!
>
> Try:
>
> dnscmd dnsserver /recordadd test.lab. ChildNewBox.child.test.lab. A
> 10.0.0.102
>
>
> Cheers,
>
> --
> Posted using the http://www.windowsforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.windowsforumz.com/DNS-cmd-add-record-domain-zone-ftopict551444.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.windowsforumz.com/eform.php?p=1747326
>

Thanks for the quick response! The command you gave above was a little bit
off. It didn't work as expected and tried to create the record for
ChildNewBox.child.test.lab.test.lab. But thanks to the resulting message I
was able to figure out the right syntax:

dnscmd dnsserver /recordadd test.lab. ChildNewBox.child A 10.0.0.102

So simple! So elegant! I feel silly for not figuring it out on my own!

Thanks again for pointing me in the right direction!