Windows Tools

DNSCmd Syntax

Overview | Syntax | Examples | Related Tools Open Command Prompt

DNSCmd uses the following general syntax:

One Step dnscmd ServerName /Operation [Parameter] [Arguments]


Operations

Dnscmd ageallrecords

Sets the current time on a timestamp to resource records at a specified zone or node on a DNS server.

Syntax

One Step dnscmd ServerName /ageallrecords ZoneName[/ NodeName]|[/tree]|[/f]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone.
/ NodeName
Specifies a specific node in the zone.
/tree
Specifies that all child nodes also receive the timestamp.
/f
Executes the command without asking for confirmation.

Remarks

Dnscmd clearcache

Clears the DNS cache memory of resource records in the specified DNS server.

Syntax

One Step dnscmd [ServerName] /clearcache

Parameter

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.

Sample usage

dnscmd reskit.com /clearcache

Dnscmd config

Allows the user to change values in the registry for the DNS server and individual zones. Accepts server-level and zone-level settings.

Caution

Server-Level Syntax

One Step dnscmd [ServerName] /config parameter [value]

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
/addressanswerlimit [0|5-28]
Specifies the maximum number of host records that a DNS server can send in response to a query. The value can be zero (0) or set between 5 and 28 records. The default value is zero (0).
/bindsecondaries [0|1]
Changes the format of the zone transfer so that it can achieve maximum compression and efficiency. However, this efficient format is incompatible with earlier versions of BIND.
Value Description
0 Uses maximum compression. Compatible with BIND versions 4.9.4 and later only.
1 Sends only one resource record per message to non-Microsoft DNS servers. Compatible with BIND versions earlier than 4.9.4. This is the default setting.
/bootmethod [0|1|2|3]
Determines the source from which the DNS server gets its configuration information.
Value Description
0 No source.
1 Loads from the BIND file that is located in the DNS directory; by default, %systemroot% \System32\DNS..
2 Loads from the registry.
3 Loads from Active Directory and the registry. This is the default setting.
/defaultagingstate [0|1]
Determines whether the DNS scavenging feature is enabled by default on newly created zones.
Value Description
0 Disables scavenging. This is the default setting.
1 Enables scavenging.
/defaultnorefreshinterval [0x1-0xFFFFFFFF|0xA8]
Sets a period of time in which no refreshes are accepted for dynamically updated records. This value is inherited automatically by zones on the server. To change the default, enter a value between 0x1 and 0xFFFFFFFF. The default value from the server is 0xA8.
/defaultrefreshinterval [0x1-0xFFFFFFFF|0xA8]
Sets a period of time that is allowed for dynamic updates to DNS records. This value is inherited automatically by zones on the server. To change the default, enter a value between 0x1 and 0xFFFFFFFF. The default value from the server is 0xA8.
/disableautoreversezones [0|1]
Enables or disables the automatic creation of reverse lookup zones.
Value Description
0 Enables creation of auto-reverse zones. This is the default setting.
1 Disables creation of auto-reverse zones.
/eventloglevel [0|1|2|4]
Determines which events are logged in the DNS server log in Event Viewer.
Value Description
0 Logs no events.
1 Logs only errors.
2 Logs only errors and warnings.
4 Logs errors, warnings, and informational events. This is the default setting.
/forwarddelegations [0|1]
Determines how a query for a delegated subzone is handled by the DNS server. These queries can either be sent to the subzone referred to in the query or be sent to the list of forwarders named for the DNS server. Entries in the setting are used only when forwarding is enabled.
Value Description
0 Automatically sends queries referring to delegated subzones to the appropriate subzone. This is the default setting.
1 Forwards queries referring to the delegated subzone to the existing forwarders.
/forwardingtimeout [0x1-0xFFFFFFFF|0x5]
Determines how many seconds a DNS server waits for a forwarder to respond before trying another. The range is 0x1 through 0xFFFFFFFF. The default value is 0x5, which is 5 seconds.
/isslave [0|1]
Determines how the DNS server responds when forwarded queries receive no response.
Value Description
0 Not a slave. If the forwarder does not respond, the server attempts to resolve the query itself. This is the default setting.
1 A slave. If the forwarder does not respond, the server terminates the search and sends a failure to the resolver.
/localnetpriority [0|1]
Determines the order in which host records are returned when the server has multiple host records for the same name.
Value Description
0 Returns the records in the order in which they are listed in the DNS database.
1 Returns the records that have similar IP network addresses first. This is the default setting.
/logfilemaxsize [0x10000-0xFFFFFFFF|0x400000]
Specifies the maximum size in bytes of the Dns.log file. When the file reaches its maximum, DNS overwrites the oldest events. Settings range from 0x10000 through 0xFFFFFFFF. The default size is 0x400000, which is 4 MB.
/logfilepath [path+LogFileName]
Specifies the path of the Dns.log file. The default path is %systemroot% \System32\Dns\Dns.log. A different path can be specified by using the format path+LogfileName.
/loglevel [EventType]
Determines which type of events are recorded in the Dns.log file. Each of the types of events is represented by a hexadecimal number. If you want more than one event in the log, use hexadecimal addition to add the values, then enter the sum.
Value Description
0x0 The DNS server does not create a log. This is the default entry.
0x10 Logs queries.
0x10 Logs notifications.
0x20 Logs updates.
0xFE Logs non-query.
0x100 Logs question transactions.
0x200 Logs answers.
0x1000 Logs send packets.
0x2000 Logs receive packets.
0x4000 Logs UDP packets.
0x8000 Logs TCP packets.
0xFFFF Logs all packets.
0x10000 Logs Active Directory write transactions.
0x20000 Logs Active Directory update transactions.
0x1000000 Logs full packets.
0x80000000 Logs write-through transactions.
/maxcachesize
Specifies the maximum size of the DNS server’s memory cache.
/maxcachettl [0x1-0xFFFFFFFF|0x15180]
Determines how many seconds a record is saved in cache. The setting can be from 0x0 to 0xFFFFFFFF. If the 0x0 setting is used, then the DNS server does not cache records. The default setting is 0x15180 (86,400 seconds or 1 day).
/maxnegativecachettl [0x1-0xFFFFFFFF|0x15180]
Specifies how many seconds an entry that records a negative answer to a query remains stored in the DNS cache. The default setting is 900 seconds.
/namecheckflag [0|1|2|3]
Specifies which character standard is used when allowing DNS names.
Value Description
0 Uses ANSI characters that comply with IETF Requests For Comment (RFC).
1 Uses ANSI characters that do not necessarily comply with IETF RFCs.
2 Uses multibyte UTF8 characters. This is the default setting.
3 Uses all characters.
/norecursion [0|1]
Determines whether a DNS server performs recursive name resolution.
Value Description
0 DNS server performs recursive resolution if it is requested in a query. This is the default setting.
1 DNS server does not perform recursive resolution.
/recursionretry [0x1-0xFFFFFFFF|0x3]
Determines the number of seconds a DNS server waits before again trying to contact a remote server. The settings range from 0x1 through 0xFFFFFFFF. The default setting is 0x3 (3 seconds). This value should be increased when recursion occurs over a slow WAN link.
/recursiontimeout [0x1-0xFFFFFFFF|0xF]
Determines the number of seconds a DNS server waits before discontinuing attempts to contact a remote server. The settings range from 0x1 through 0xFFFFFFFF. The default setting is 0xF (15 seconds). This value should be increased when recursion occurs over a slow WAN link.
/roundrobin [0|1]
Determines the order in which host records are returned when a server has multiple host records for the same name.
Value Description
0 DNS server does not use round robin; instead, it returns the first record to every query.
1 DNS server rotates among the records that it returns from the top to the bottom of the list of matching records. This is the default setting.
/rpcprotocol [0x0|0x1|0x2|0x4|0xFFFFFFFF]
Specifies the protocol that RPC uses when making a connection from the DNS server.
Value Description
0x0 Disables RPC for DNS.
0x1 Uses TCP/IP.
0x2 Uses named pipes.
0x4 Uses LPC.
0xFFFFFFFF All protocols. This is the default setting.
/scavenginginterval [0x0-0xFFFFFFFF|0x0]
Determines whether the scavenging feature for the DNS server is enabled, and sets the number of hours between scavenging cycles. The settings range from 0x0 through 0xFFFFFFFF. The default setting is 0x0, which disables scavenging for the DNS server. A setting greater than 0x0 enables scavenging for the server and sets the number of hours between scavenging cycles.
/secureresponses [0|1]
Determines whether DNS filters records that are saved in a cache.
Value Description
0 Saves all responses to name queries to a cache. This is the default setting.
1 Saves only the records that belong to the same DNS subtree to cache.
/sendport [0x0-0xFFFFFFFF|0x0]
Specifies the port number that DNS uses to send recursive queries to other DNS servers. The settings range from 0x0 through 0xFFFFFFFF. The default setting is 0x0, which means the port number is randomly selected.
/strictfileparsing [0|1]
Determines a DNS server's behavior when it encounters an erroneous record while loading a zone.
Value Description
0 Continues to load even if the server encounters an erroneous record. The error is recorded in the DNS log. This is the default setting.
1 Stops loading and records the error in the DNS log.
/updateoptions RecordValue
Prohibits dynamic updates of specified types of records. The settings range from 0x0 through 0x80000000. If you want more than one record type prohibited in the log, use hexadecimal addition to add the values, then enter the sum.
Value Description
0x0 Does not restrict any record types.
0x1 Excludes SOA (Start of Authority) records.
0x2 Excludes NS (name server) records.
0x4 Excludes delegation NS records.
0x8 Excludes server host records.
0x100 On secure dynamic update, excludes SOA records.
0x200 On secure dynamic update, excludes root NS records.
0x30F On standard dynamic update, excludes NS, SOA, and server host records. On secure dynamic update, excludes root NS and SOA records. Allows delegations and server host updates.
0x400 On secure dynamic update, excludes delegation NS records.
0x800 On secure dynamic update, excludes server host records.
0x1000000 Excludes DS per records.
0x80000000 Disables DNS dynamic update.
/writeauthorityns [0|1]
Determines when the DNS server writes name server (NS) records in the Authority section of a response.
Value Description
0 Writes NS records in the Authority section of referrals only. This setting complies with RFC 1034, Domain names—concepts and facilities, and with RFC 2181, Clarifications to the DNS Specification. This is the default setting.
1 Writes NS records in the Authority section of all successful authoritative responses.
/xfrconnecttimeout [0x0-0xFFFFFFFF|0x1E]
Determines the number of seconds a primary DNS server waits for a transfer response from its secondary. The settings range from 0x0 through 0xFFFFFFFF. The default value is 0x1E (30 seconds). After the timeout value expires, the connection is terminated.
/logipfilterlist IPaddress
Specifies which packets are logged in the debug log file. The entries are a list of IP addresses. Only packets going to and from the IP addresses in the list are logged.
/dspollinginterval
Specifies how often the DNS server polls Active Directory for changes in Active Directory-integrated zones. The default value is 300 seconds.
/enablednssec 0|1
Enables or disables DNSSEC.
Value Description
0 Disables DNSSEC.
1 Enables DNSSEC.
/enableednsprobes 0|1
Enables or disables EDnsProbes.
Value Description
0 Disables active support for EDnsProbes.
1 Enables active support for EDnsProbes.
/ednscachetimeout
Specifies the number of seconds that EDns information is cached.
/disablensrecordsautocreation 0|1
Specifies whether the DNS server automatically creates NS records for zones that it hosts.
Value Description
0 Automatically creates NS records for zones that it hosts.
1 Does not automatically create NS records for zones that it hosts.

Zone-Level Syntax

One Step dnscmd /config parameter ZoneName [value]

Parameters

/aging
Enables or disables scavenging in a specific zone.
/allownsrecordsautocreation
Overrides the DNS server's NS record autocreation setting.
/allowupdate
Determines whether the specified zone accepts dynamic updates.
/refreshinterval
Sets a time interval for a zone during which refreshes can dynamically update DNS records in a specified zone.
/norefreshinterval
Sets a time interval for a zone during which no refreshes can dynamically update DNS records in a specified zone.
/securesecondaries
Determines which secondary servers can receive zone updates from the master for this zone.
/forwardertimeout
Determines how many seconds a DNS zone waits for a forwarder to respond before trying another. This value overrides the value set at the server level.
/forwarderslave
Overrides the DNS server /isslave setting.

Remarks

Dnscmd createbuiltindirectorypartition

Creates a DNS application directory partition. By default a default directory partition for DNS is created at the forest and domain levels. Use this operation to create default DNS application directory partitions that were deleted or never created. With no argument, this operation creates a built-in DNS directory partition for the domain.

Syntax

One Step dnscmd [ServerName] /createdirectoryparition [/forest] [/alldomains]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
/forest
Creates a DNS directory partition for the forest.
/alldomains
Creates DNS partitions for all domains in the forest.

Dnscmd createdirectorypartition

Creates a DNS application directory partition. By default a default directory partition for DNS is created at the forest and domain levels. This operation creates additional DNS application directory partitions.

Syntax

One Step dnscmd [ServerName] /createdirectoryparition FQDNofDP

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
FQDNofDP
The fully qualified domain name of the DNS application directory partition that will be created.

Dnscmd deletedirectorypartition

Removes an existing DNS application directory partition.

Syntax

One Step dnscmd [ServerName] /deletedirectoryparition FQDNofDP

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
FQDNofDP
The fully qualified domain name of the DNS application directory partition that will be removed.

Dnscmd enlistdirectorypartition

Adds the DNS server to the specified directory partition's replica set.

Syntax

One Step dnscmd [ServerName] /enlistdirectoryparition FQDNofDP

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
FQDNofDP
The fully qualified domain name of the DNS application directory partition.

Dnscmd enumrecords

Lists the resource records of a specified node in a DNS zone.

Syntax

One Step dnscmd [ServerName] /enumrecords ZoneName NodeName [/type RRType RRData] [/authority] [/glue] [/additional] {[/node |/child |[/startchild ChildName]]} {[/continue |/detail]}

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to which the record belongs.
NodeName
Specifies the name of the node of the record.
/authority /glue /additional {[/node | /child | [/startchild ChildName]}
Filters or adds information to the record display.
Value Description
/authority Includes authoritative data.
/glue Includes glue data.
/additional Includes all additional information about the records listed.
/node Lists only the records of the specified node.
/child Lists only the records of a specified child.
/startchild ChildName Begins the list at the specified child.
/continue|/detail
Specifies how the returned data is displayed.
Value Description
/continue Lists only the records with their type and data.
/detail Lists all information about the records.

Sample Usage

dnscmd /enumrecords reskit.com test /additional

Dnscmd enumzones

Lists zones that exist on the specified DNS server.

Syntax

One Step dnscmd [ServerName] /enumzones [/primary|/secondary|/stub|/cache|/auto-created] [/forward|/reverse]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
/primary|/secondary|/stub|/cache|/auto-created
Filters the types of zones to display.
Value Description
/primary Lists all zones that are either standard primary or Active Directory-integrated.
/secondary Lists all standard secondary zones.
/stub Lists all stub zones.
/cache Lists only the zones that are loaded into cache.
/auto-created Lists the zones that were created automatically during the DNS server installation.
/forward|/reverse
Specifies an additional filter of the types of zones to display.
Value Description
/forward Lists forward lookup zones.
/reverse Lists reverse lookup zones.

Remarks

Examples

See Example 2: Display a Complete List of Zones on a DNS Server or Example 3: Display a List of Auto-Created Zones on a DNS Server.

Dnscmd info

Displays settings from the DNS section of the registry, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Parameters, of the specified server.

Syntax

One Step dnscmd [ServerName] /info [Setting]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
Setting
Any setting returned by the info operation can be individually specified. If a setting is not specified, then all settings are returned.

Remarks

Examples

See Example 4: Display the IsSlave Setting from a DNS Server or Example 5: Display the RecursionTimeout Setting from a DNS Server.

Dnscmd nodedelete

Deletes all records for a specified host.

Syntax

One Step dnscmd [ServerName] /nodedelete ZoneName NodeName [/tree] [/f]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone.
NodeName
Specifies the host name of node to delete.
/tree
Specifies to delete all of the child records.
/f
Executes the command without asking for confirmation.

Sample Usage

DNSCmd reskit.com /NodeDelete test.reskit.com node /Tree
DNSCmd reskit.com /NodeDelete test.reskit.com host /F

Dnscmd recordadd

Adds a record to a specified zone in a DNS server.

Syntax

One Step dnscmd [ServerName] /recorddelete ZoneName NodeName RRType RRData

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the zone in which the record resides.
NodeName
Specifies a specific node in the zone.
RRType
Specifies the type of record to be added.
RRData
Specifies the type of data that is expected when using a certain data type.

Note

  • When you add a record, make sure you use the correct data type and data format. For a list of resource record types and the appropriate datatypes, see Resource Records Reference.

Sample Usage

dnscmd reskit.com /recordadd test A 10.0.0.5
dnscmd /recordadd reskit.com test MX 10 mailserver.reskit.com

Dnscmd recorddelete

Deletes a resource record from a specified zone.

Syntax

One Step dnscmd ServerName /recorddelete ZoneName NodeName RRType RRData [/f]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the zone in which the record resides.
NodeName
Specifies the name of the host.
RRType
Specifies the type of record to be deleted.
RRData
Specifies the type of data that is expected when using a certain data type.
/f
Executes the command without asking for confirmation.

Note

  • Because nodes can have more than one resource record, this command requires you to be very specific about the type of record that you want to delete.

    If you specify a data type and do not specify a type of resource record data, then all records with that specific data type for the specified node are deleted. For a list of resource record types and the appropriate data types, see Resource Records Reference.

Sample Usage

DNSCmd /RecordDelete reskit.com test MX 10 mailserver.reskit.com

Dnscmd resetforwarders

Selects or resets IP address(es) to which the DNS server forwards DNS queries when it cannot solve them locally.

Syntax

One Step dnscmd [ServerName] /resetforwarders [IPAddress] [,IPAddress][,...] [/timeout TimeOut] [/slave|/noslave]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
IPAddress
Lists the IP address(es) to which the DNS server forwards unresolved queries.
/timeout TimeOut
Sets the number of seconds that the DNS server waits for a response from the forwarder. By default, this value is 5 seconds.
/slave|/noslave
Determines whether the DNS server performs its own iterative queries if the forwarder fails to resolve a query.
Value Description
/slave Prevents the DNS server from performing its own iterative queries if the forwarder fails to resolve a query.
/noslave Allows the DNS server to perform its own iterative queries if the forwarder fails to resolve a query. This is the default setting.

Remarks

Sample Usage

dnscmd reskit.com /resetforwarders 10.0.0.1 /timeout 7 /slave
dnscmd reskit.com /resetforwarders /noslave

Dnscmd resetlistenaddresses

Specifies the IP addresses on a server that listen for DNS client requests.

Syntax

One Step dnscmd [ServerName] /resetlistenaddresses [ListenAddress]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ListenAddress
Specifies an IP address on the DNS server that listens for DNS client requests. If no listen address is specified, then all IP addresses on the server listen for client requests.

Remarks

Sample Usage

dnscmd reskit.com /resetlistenaddresses 10.0.0.1

Dnscmd startscavenging

Notifies a DNS server to attempt an immediate search for stale resource records in a specified DNS server.

Syntax

One Step dnscmd [ServerName] /startscavenging

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.

Remarks

Sample Usage

dnscmd reskit.com /startscavenging

Dnscmd statistics

Displays or clears data for a specified DNS server.

Syntax

One Step dnscmd [ServerName] /statistics [StatID] [/clear]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
StatID
Specifies which statistic or combination of statistics displays. An identification number is used to specify a statistic. If no statistic ID is specified, all statistics display.

The following table lists numbers that can be specified and the corresponding statistic that lists:

Value Description
00000001 Time
00000002 Query
00000004 Query2
00000008 Recurse
00000010 Master
00000020 Secondary
00000040 Wins
00000100 Update
00000200 SkwanSec
00000400 Ds
00010000 Memory
00100000 PacketMem
00040000 Dbase
00080000 Records
00200000 NbstatMem
/clear
Resets the specified statistics counter to zero.

Remarks

Examples

See Example 7: Display Time Statistics for a DNS Server or Example 8: Display NbstatMem Statistics for a DNS Server.

Dnscmd unenlistdirectorypartitions

Removes the DNS server from the specified directory partition's replica set.

Syntax

One Step dnscmd [ServerName] /unenlistdirectoryparition FQDNofDP

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
/FQDNofDP
The fully qualified domain name of the DNS application directory partition that will be removed.

Dnscmd writebackfiles

Checks DNS server memory for changes and writes them to persistent storage.

Syntax

One Step dnscmd [ServerName] /writebackfiles [ZoneName]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be updated.

Remarks

Sample Usage

dnscmd reskit.com /writebackfiles

Dnscmd zoneadd

Adds a zone to the DNS server.

Syntax

One Step dnscmd [ServerName] /zoneadd ZoneName ZoneType {[/dsprimary |/primary /file FileName|/secondary MasterIPaddress [, MasterIPaddress...][|/stub MasterIPaddress [, MasterIPaddress...] [/file FileName]|dsstub MasterIPaddress [, MasterIPaddress...] /forwarder|/dsforwarder} [/dp FQDN| [/domain|/enterprise|/legacy]]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone.
ZoneType
Specifies the type of zone to create. Each type has different required parameters.
/dsprimary |/primary|/secondary|/stub|/dsstub /forwarder|/dsforwarder
Creates a specific type of zone.
Value Description
/dsprimary Creates an Active Directory-integrated zone.
/primary /file FileName Creates a standard primary zone.
/secondary MasterIPaddress [, MasterIPaddress... Creates a standard secondary zone.
/stub MasterIPaddress [, MasterIPaddress... /file FileName Creates a file-backed stub zone.
/dsstub MasterIPaddress [, MasterIPaddress... Creates an Active Directory-integrated stub zone.
/forwarder MasterIPaddress [, MasterIPaddress... /file FileName Specifies that the zone created forwards unresolved queries to another DNS server.
/dsforwarder Specifies that the active directory-integrated zone created forwards unresolved queries to another DNS server.
/dp FQDN|[/domain|/enterprise|/legacy]
Specifies the directory partition on which to store the zone.
Value Description
FQDN Specifies fully qualified domain name of the directory partition.
/domain Stores the zone on the domain directory partition.
/enterprise Stores the zone on the enterprise directory partition.
/legacy Stores the zone on a legacy directory partition.

Remarks

Sample Usage

dnscmd reskit.com /zoneadd test.reskit.com /dsprimary
dnscmd reskit.com /zoneadd secondtest.reskit.com /secondary 10.0.0.2

Dnscmd zonedelete

Deletes a specified zone.

Syntax

One Step dnscmd [ServerName] /zonedelete ZoneName [/dsdel] [/f]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be deleted.
/dsdel
Deletes the zone from Active Directory.
/f
Executes the command without asking for confirmation.

Examples

See Example 9: Delete a Zone from a DNS Server.

Dnscmd zoneexport

Creates a text file that lists the resource records of a specified zone.

Syntax

One Step dnscmd [ServerName] /zoneexport ZoneName ZoneExportFile

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone.
ZoneExportFile
Specifies the name of the file to create.

Remarks

Examples

See Example 10: Export Zone Resource Records List to a File.

Dnscmd zoneinfo

Displays settings from the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNS\Parameters\Zones\Zonename section of the registry of the specified zone.

Syntax

One Step dnscmd [ServerName] /zoneinfo ZoneName [Setting]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone.
Setting
Any setting returned with the zoneinfo operation can be individually specified. If a setting is not specified, then all settings are returned.

Remarks

Examples

See Example 11: Display RefreshInterval Setting from the Registry or Example 12: Display Aging Setting from the Registry.

Dnscmd zonepause

Pauses the specified zone, which then ignores query requests.

Syntax

One Step dnscmd [ServerName] /zonepause ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be paused.

Remarks

Sample Usage

dnscmd reskit.com /zonepause test.reskit.com

Dnscmd zoneprint

Lists the records in a zone.

Syntax

One Step dnscmd [ServerName]/zoneprint ZoneName

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Identifies the zone on which the type will be changed.

Dnscmd zoneresettype

Changes the type of the zone.

Syntax

One Step dnscmd [ServerName]/zoneresettype ZoneName {[/primary /file FileName]|[/secondary MasterIPaddress MasterIPaddress /file FileName ]|[ /stub MasterIPaddress MasterIPaddress /file FileName ]|[ /dsstub MasterIPaddress MasterIPaddress ]| /dsprimary]} [/forwarder] MasterIPaddress MasterIPaddress [/overwrite_mem|/overwrite_ds]

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Identifies the zone on which the type will be changed.
property
Specifies the type to which the zone changes and information that may be required to change the zone type, such as file name for primary zones or master IP address for secondary zones.
/primary /file FileName]|[/secondary MasterIPaddress MasterIPaddress /file FileName ]|[ /stub MasterIPaddress MasterIPaddress /file FileName ]|[ /dsstub MasterIPaddress MasterIPaddress ]| /dsprimary| [/forwarder MasterIPaddress MasterIPaddress]
Specifies that one type of zone be changed to another type.
Value Description
/primary Changes the existing zone to a standard primary zone.
/secondary Changes the existing zone to a standard secondary zone.
/stub Changes the existing zone to a standard stub zone.
/dsstub Changes the existing zone to an Active Directory-integrated stub zone.
/dsprimary Changes the existing zone to an Active Directory-integrated primary zone.
/forwarder Changes the existing zone to one that forwards queries when it cannot resolve them locally.
/overwrite_mem|/overwrite_ds
Specifies how to overwrite existing data.
Value Description
/overwrite_mem Overwrites DNS data from data in Active Directory.
/overwrite_ds Overwrites existing data in Active Directory.

Remarks

Sample Usage

dnscmd reskit.com /zoneresettype test.reskit.com /primary /file test.reskit.com.dns
dnscmd reskit.com /zoneresettype second.reskit.com /secondary 10.0.0.2

Dnscmd zonerefresh

Forces a secondary DNS zone to update from the master.

Syntax

One Step dnscmd ServerName /zonerefresh ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be refreshed.

Remarks

Sample Usage

dnscmd reskit.com /zonerefresh test.reskit.com

Dnscmd zonereload

Copies zone information from its source.

Syntax

One Step dnscmd ServerName /zonereload ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be reloaded.

Remarks

Sample Usage

dnscmd reskit.com /zonereload test.reskit.com

Dnscmd zoneresetmasters

Resets the IP addresses of the master server that provides zone transfer information to a secondary zone.

Syntax

One Step dnscmd ServerName /zoneresetmasters ZoneName [/local] [ServerIPs]

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to be reloaded.
/local
Sets a local master list. Used for Ds-integrated zones.
ServerIPs
The IP addresses of the master server(s)of the secondary zone. Enter this value as IPaddress [,IPaddress...].

Remarks

Sample Usage

dnscmd reskit.com /zoneresetmasters test.reskit.com 10.0.0.1
dnscmd reskit.com /zoneresetmasters test.reskit.com /local

Dnscmd zoneresetscavengeservers

Changes the IP address(es) of the server(s) that can scavenge the specified zone.

Syntax

One Step dnscmd [ServerName] /zoneresetscavengeservers ZoneName[: ServerIPs]

Parameters

ServerName
Specifies the DNS server the administrator is planning to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Identifies the zone to scavenge.
ServerIPs
Lists the IP address(es) of the server(s) that can perform the scavenge. If this parameter is omitted, then all servers hosting this zone can scavenge it.

Remarks

Sample Usage

dnscmd reskit.com test.reskit.com /zoneresetscavengeservers 10.0.0.1 10.0.0.2

Dnscmd zoneresetsecondaries

Specifies a list of IP addresses to which a master server responds when asked for a zone transfer.

Syntax

One Step dnscmd [ServerName] /zoneresetsecondaries ZoneName {/noxfr|/nonsecure|/securens|/securelist SecurityIPAddresses} {/nonotify|/notify|/notifylist NotifyIPAddresses}

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to have its secondaries reset.
/noxfr|/nonsecure|/securens|/securelist SecurityIPAddresses
Specifies whether only some or all of the secondary servers requesting an update get one.
Value Description
/noxfr Specifies that no zone transfers are allowed.
/nonsecure Specifies that all zone transfer requests are granted.
/securens Specifies that only the server listed in the NS record for the zone is granted a transfer.
/securelist Specifies that zone transfers are granted only to the list of servers. This parameter must be followed by an IP address or addresses that the master server uses.
SecurityIPAddresses Lists the IP addresses that receive zone transfers from the master server. This parameter is used only with the /securelist parameter.
/nonotify|/notify|/notifylist NotifyIPAddresses
Specifies a change notification is sent only to certain secondary servers.
Value Description
/nonotify Specifies that no change notifications are sent to secondary servers.
/notify Specifies that change notifications are sent to all secondary servers.
/notifylist Specifies that change notifications are sent to only the list of servers. This command must be followed by an IP address or addresses that the master server uses.
NotifyIPAddresses Specifies the IP address(es) of the secondary server(s) to which change notifications are sent. This list is used only with the /notifylist parameter.

Remarks

Sample Usage

dnscmd reskit.com /zoneresetsecondaries test.reskit.com /noxfr /nonotify
dnscmd reskit.com /zoneresetsecondaries test.reskit.com /securelist 11.0.0.2

Dnscmd zoneresume

Starts a specified zone that was previously paused.

Syntax

One Step dnscmd ServerName /zoneresume ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to resume.

Remarks

Sample Usage

dnscmd reskit.com /zoneresume test.reskit.com

Dnscmd zoneupdatefromds

Updates the specified directory-integrated zone from Active Directory.

Syntax

One Step dnscmd ServerName /zoneupdatefromds ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to update.

Remarks

Sample Usage

dnscmd reskit.com /zoneupdatefromds

Dnscmd zonewriteback

Checks DNS server memory for changes relevant to a specified zone and writes them to persistent storage.

Syntax

One Step dnscmd ServerName /zonewriteback ZoneName

Parameters

ServerName
Specifies the DNS server the administrator plans to manage, represented by local computer syntax, IP address, FQDN, or Host name. If omitted, the local server is used.
ZoneName
Specifies the name of the zone to update.

Remarks

Sample Usage

dnscmd reskit.com /zonewriteback test.reskit.com

Dnscmd zonechangedirectorypartition

One Step dnscmd [ServerName] /zonechangedirectoryparition /ZoneName] { [/NewPartitionName] | [zonetype] }

/ZoneName
FQDN of the current directory partition on which the zone resides.
/NewPartitionName
FQDN of the directory partition that the zone will be moved to.
/domain|/forest|/legacy
Specifies the type of directory partition that the zone will be moved to.
ZoneType Description
/domain Move the zone to the built-in domain directory parition..
/forest Move the zone to the built-in forest directory partition.
/legacy Move the zone to the directory partition created for downlevel domain controllers. These directory partitions are not needed when in native mode.