JSI Tip 3905. Manage Windows 2000 DNS from the command prompt.


DNSCMD from the the Support\Tools on the CD-ROM can be used to manage DNS from a CMD prompt or in a batch file.

I first introduced DNSCMD in tip 2192 » My Windows 2000 DNS server's Root Hints and Forwarder pages are not available?

You can install all the support tools or Extract the ones you want from the Support.cab file.

The syntax for using DNSCMD is:

USAGE:  DnsCmd <ServerName> <Command> \[<Command Parameters>\]

    <ServerName>:
        .                     -- local machine using LPC
        IP address            -- RPC over TCP/IP
        DNS name              -- RPC over TCP/IP
        other server name     -- RPC over named pipes
    <Command>:
        /Info                 -- Get server information
        /Config               -- Reset server or zone configuration
        /EnumZones            -- Enumerate zones
        /Statistics           -- Query/clear server statistics data
        /ClearCache           -- Clear DNS server cache
        /WriteBackFiles       -- Write back all zone or root-hint datafile(s)
        /StartScavenging      -- Initiates server scavenging
        /ResetListenAddresses -- Select server IP address(es) to serve DNS requests
        /ResetForwarders      -- Set DNS servers to forward recursive queries to
        /ZoneInfo             -- View zone information
        /ZoneAdd              -- Create a new zone on the DNS server
        /ZoneDelete           -- Delete a zone from DNS server or DS
        /ZonePause            -- Pause a zone
        /ZoneResume           -- Resume a zone
        /ZoneReload           -- Reload zone from its database (file or DS)
        /ZoneWriteBack        -- Write back zone to file
        /ZoneRefresh          -- Force refresh of secondary zone from master
        /ZoneUpdateFromDs     -- Update a DS integrated zone by data from DS
        /ZoneResetType        -- Change zone type Primary/Secondary/DSintegrated
        /ZoneResetSecondaries -- Reset secondary\notify information for a zone
        /ZoneResetScavengeServers-- Reset scavenging servers for a zone
        /ZoneResetMasters     -- Reset secondary zone's master servers
        /EnumRecords          -- Enumerate records at a name
        /RecordAdd            -- Create a record in zone or RootHints
        /RecordDelete         -- Delete a record from zone, RootHints or Cache data
        /NodeDelete           -- Delete all records at a name
        /AgeAllRecords        -- Force aging on node(s) in zone
    <Command Parameters>:
        -- parameters specific to each Command
        dnscmd <CommandName> /? -- For help info on specific Command


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish