Home Windows How to export Active Directory - DNS Zone to text file? - dnscmd usage.
How to export Active Directory - DNS Zone to text file? - dnscmd usage. PDF Print E-mail
Written by Siva   
Tuesday, 23 November 2010 13:35

 

Highlighted example in last few lines:

 

Microsoft Windows [Version 6.0.6001]

Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

 

C:\Users\Administrator.CORP>dnscmd

 

Usage: DnsCmd <ServerName> <Command> [<Command Parameters>]

 

<ServerName>:

  IP address or host name    -- remote or local DNS server

  .                          -- DNS server on local machine

<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

  /IpValidate                -- Validate remote DNS servers

  /ResetListenAddresses      -- Set 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

  /ZonePrint                 -- Display all records in the zone

  /ZoneResetType             -- Change zone type

  /ZoneResetSecondaries      -- Reset secondary\notify information for a zone

  /ZoneResetScavengeServers  -- Reset scavenging servers for a zone

  /ZoneResetMasters          -- Reset secondary zone's master servers

  /ZoneExport                -- Export a zone to file

  /ZoneChangeDirectoryPartition -- Move a zone to another directory partition

  /EnumRecords               -- Enumerate records at a name

  /RecordAdd                 -- Create a record in zone or RootHints

  /RecordDelete              -- Delete a record from zone, RootHints or cache

  /NodeDelete                -- Delete all records at a name

  /AgeAllRecords             -- Force aging on node(s) in zone

  /EnumDirectoryPartitions   -- Enumerate directory partitions

  /DirectoryPartitionInfo    -- Get info on a directory partition

  /CreateDirectoryPartition  -- Create a directory partition

  /DeleteDirectoryPartition  -- Delete a directory partition

  /EnlistDirectoryPartition  -- Add DNS server to partition replication scope

  /UnenlistDirectoryPartition -- Remove DNS server from replication scope

  /CreateBuiltinDirectoryPartitions -- Create built-in partitions

  /ExportSettings            -- Output settings to DnsSettings.txt in the DNS se

rver database directory

 

<Command Parameters>:

  DnsCmd <CommandName> /? -- For help info on specific Command

 

C:\Users\Administrator.CORP>dnscmd/Info

 

Query result:

 

Server info

        server name              = TK-DC2.corp.vmgenie.com

        version                  = 17710006 (6.0 build 6001)

        DS container             = cn=MicrosoftDNS,cn=System,DC=corp,DC=vmgenie,

DC=com

        forest name              = corp.vmgenie.com

        domain name              = corp.vmgenie.com

        builtin forest partition = ForestDnsZones.corp.vmgenie.com

        builtin domain partition = DomainDnsZones.corp.vmgenie.com

        read only DC             = 0

        last scavenge cycle      = not since restart (0)

  Configuration:

        dwLogLevel               = 00000000

        dwDebugLevel             = 00000000

        dwRpcProtocol            = FFFFFFFF

        dwNameCheckFlag          = 00000002

        cAddressAnswerLimit      = 0

        dwRecursionRetry         = 3

        dwRecursionTimeout       = 8

        dwDsPollingInterval      = 180

  Configuration Flags:

        fBootMethod                  = 3

        fAdminConfigured             = 1

        fAllowUpdate                 = 1

        fDsAvailable                 = 1

        fAutoReverseZones            = 1

        fAutoCacheUpdate             = 0

        fSlave                       = 0

        fNoRecursion                 = 0

        fRoundRobin                  = 1

        fStrictFileParsing           = 0

        fLooseWildcarding            = 0

        fBindSecondaries             = 0

        fWriteAuthorityNs            = 0

        fLocalNetPriority            = 1

  Aging Configuration:

        ScavengingInterval           = 0

        DefaultAgingState            = 0

        DefaultRefreshInterval       = 168

        DefaultNoRefreshInterval     = 168

  ServerAddresses:

 

        Ptr          = 0051D1F8

        MaxCount     = 1

        AddrCount    = 1

                Addr[0] => af=2, salen=16, [sub=0, flag=00000000] p=13568, addr=

10.70.10.5

 

  ListenAddresses:

        NULL IP Array.

  Forwarders:

 

        Ptr          = 0051D270

        MaxCount     = 1

        AddrCount    = 1

                Addr[0] => af=2, salen=16, [sub=0, flag=00000000] p=13568, addr=

10.70.10.1

 

        forward timeout  = 3

        slave            = 0

Command completed successfully.

 

 

C:\Users\Administrator.CORP>dnscmd/ZoneExport

 

Usage: DnsCmd <ServerName> /ZoneExport <ZoneName> <ZoneExportFile>

    <ZoneName>   -- FQDN of zone to export

                    /Cache to export cache

 

Command failed:  ERROR_INVALID_PARAMETER     87

 

Check the required arguments and format of your command.

 

 

C:\Users\Administrator.CORP>dnscmd localhost /ZoneExport corp.vmgenie.com ss.txt

 

 

DNS Server localhost exported zone

  corp.vmgenie.com to file %windir%\system32\dns\ss.txt on the DNS server

Command completed successfully.

 

 

C:\Users\Administrator.CORP>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last Updated on Tuesday, 23 November 2010 13:43
 
 

Advertisement

Featured Links:
HREmail.com
Looking for job? Try HREmail.com
Want to have CMS based Websites?
Try siliconwebcreators.com to CMS based websites.
VM Solutions Inc
For best VM solutions..
Digital Procedure Inc.
Looking for Oracle /SAP /Weblogic Consulting services? visit digitalprocedure.com