• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

Can I script entries to the Windows DNS server?

I regularly have a requirement to make the same change to every host listed in my DNS servers.
I want to script this in a batch file, or simular.

Please provide links to documentation for such, &/or post examples of how to make an entry on all domains (without having to list all the domains in the batch file!)
0
CraigHarris
Asked:
CraigHarris
  • 3
  • 2
  • 2
1 Solution
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
0
 
CraigHarrisAuthor Commented:
My servers are Windows 2003 R2 Standard, 64bit edition -- a solution which works directly on such is required.
0
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
Would have helped if you mentioned that little detail in the question...
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
CraigHarrisAuthor Commented:
(I did ask in the Windows 2003 section)
But yeah, 64bit causes issues due to Microsoft not supporting most tools on this platform :( !
0
 
NJComputerNetworksCommented:
Maybe the DNSCMD might help?  Not sure...


C:\Documents and Settings\me>dnscmd /RecordAdd /?
Usage: DnsCmd <ServerName> /RecordAdd <Zone> <NodeName> [/Aging] [/OpenAcl]
              [<Ttl>] <RRType> <RRData>

  <RRType>          <RRData>
    A               <IPAddress>
    NS,CNAME,MB,MD  <HostName|DomainName>
    PTR,MF,MG,MR    <HostName|DomainName>
    MX,RT,AFSDB     <Preference> <ServerName>
    SRV             <Priority> <Weight> <Port> <HostName>
    SOA             <PrimaryServer> <AdminEmail> <Serial#>
                      <Refresh> <Retry> <Expire> <MinTTL>
    AAAA            <Ipv6Address>
    TXT             <String> [<String>]
    X25,HINFO,ISDN  <String> [<String>]
    MINFO,RP        <MailboxName> <ErrMailboxName>
    WKS             <Protocol> <IPAddress> <Service> [<Service>]..]
    KEY             <Flags> <KeyProtocol> <CryptoAlgorithm> <Base64Data>
    SIG             <TypeCovered> <CryptoAlgorithm> <LabelCount>
                      <OriginalTTL> <SigExpiration> <SigInception>
                      <KeyTag> <Signer's Name> <Base64Data>
    NXT             <NextName> <Type> [<Type>...]
    WINS            <MapFlag> <LookupTimeout>
                      <CacheTimeout> <IPAddress> [<IPAddress>]
    WINSR           <MapFlag> <LookupTimeout>
                     <CacheTimeout> <RstDomainName>
  <Zone>            -- <ZoneName> | /RootHints
  <ZoneName>        -- FQDN of a zone
  <NodeName>        -- name of node to which a record will be added
                       - FQDN of a node  (name with a '.' at the end) OR
                       - node name relative to the ZoneName           OR
                       - "@" for zone root node                       OR
                       - service name for SRV only (e.g. _ftp._tcp)
  <Ttl>             -- TTL for the RR  (Default: TTL defined in SOA)
  <HostName>        -- FQDN of a host
  <IPAddress>       -- e.g.  255.255.255.255
  <ipv6Address>     -- e.g.  1:2:3:4:5:6:7:8
  <Protocol>        -- UDP | TCP
  <Service>         -- e.g.  domain, smtp
  <TypeCovered>     -- type of the RRset signed by this SIG
  <CryptoAlgorithm> -- 1=RSA/MD5, 2=Diffie-Hellman, 3=DSA
  <SigExpiration>   -- yyyymmddhhmmss - GMT
  <SigInception>    -- yyyymmddhhmmss - GMT
  <KeyTag>          -- used to discriminate between multiple SIGs
  <Signer's Name>   -- domain name of signer
  <KeyProtocol>     -- 1=TLS, 2=email, 3=DNSSEC, 4=IPSEC
  <Base64Data>      -- KEY or SIG binary data in base64 notation
  <NextName>        -- domain name of next RRSet in zone
0
 
CraigHarrisAuthor Commented:
I don't have dnscmd on the server - any idea how I can get it for 64bit Windows?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now