dnscmd /config command
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd
https://computerthang.com/p/intel-xeon-e5-2650l-8-core-rx560-gtx960-4g-16g-ram-240g-ssd/
Changes values in the registry for the DNS server and individual zones. This command also modifies the configuration of the specified server. Accepts server-level and zone-level settings.
Caution
Don’t edit the registry directly unless you have no alternative. The registry editor bypasses standard safeguards, allowing settings that can degrade performance, damage your system, or even require you to reinstall Windows. You can safely alter most registry settings by using the programs in Control Panel or Microsoft Management Console (mmc). If you must edit the registry directly, back it up first. Read the registry editor help for more information.
Server-level syntax
dnscmd [<servername>] /config <parameter>
Parameters
Note
This article contains references to the term slave, a term that Microsoft no longer uses. When the term is removed from the software, we’ll remove it from this article.
Parameters | Description |
---|---|
<servername> |
Specifies the DNS server that you are planning to manage, represented by local computer syntax, IP address, FQDN, or host name. If this parameter is omitted, the local server is used. |
<parameter> |
Specify a setting and, as an option, a value. Parameter values use this syntax: parameter [value]. |
/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 it can be in the range of 5 through 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. Accepts the values:
|
/bootmethod[0|1|2|3] |
Determines the source from which the DNS server gets its configuration information. Accepts the values:
|
/defaultagingstate[0|1] |
Determines whether the DNS scavenging feature is enabled by default on newly created zones. Accepts the values:
|
/defaultnorefreshinterval[0x1-0xFFFFFFFF|0xA8] |
Sets a period of time in which no refreshes are accepted for dynamically updated records. Zones on the server inherit this value automatically.To change the default value, type a value in the range of 0x1-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. Zones on the server inherit this value automatically.To change the default value, type a value in the range of 0x1-0xFFFFFFFF. The default value from the server is 0xA8. |
/disableautoreversezones [0|1] |
Enables or disables the automatic creation of reverse lookup zones. Reverse lookup zones provide resolution of Internet Protocol (IP) addresses to DNS domain names. Accepts the values:
|
/disablensrecordsautocreation [0|1] |
Specifies whether the DNS server automatically creates name server (NS) resource records for zones that it hosts. Accepts the values:
|
/dspollinginterval [0-30] |
Specifies how often the DNS server polls AD DS for changes in active directory integrated zones. |
/dstombstoneinterval [1-30] |
The amount of time in seconds to retain deleted records in AD DS. |
/ednscachetimeout [3600-15724800] |
Specifies the number of seconds that extended DNS (EDNS) information is cached. The minimum value is 3600, and the maximum value is 15,724,800. The default value is 604,800 seconds (one week). |
/enableednsprobes [0|1] |
Enables or disables the server to probe other servers to determine if they support EDNS. Accepts the values:
|
/enablednssec [0|1] |
Enables or disables support for DNS Security Extensions (DNSSEC). Accepts the values:
|
/enableglobalnamessupport [0|1] |
Enables or disables support for the GlobalNames zone. The GlobalNames zone supports resolution of single-label DNS names across a forest. Accepts the values:
|
/enableglobalqueryblocklist [0|1] |
Enables or disables support for the global query block list that blocks name resolution for names in the list. The DNS Server service creates and enables the global query block list by default when the service starts the first time. To view the current global query block list, use the dnscmd /info /globalqueryblocklist command. Accepts the values:
|
/eventloglevel [0|1|2|4] |
Determines which events are logged in the DNS server log in Event Viewer. Accepts the values:
|
/forwarddelegations [0|1] |
Determines how the DNS server handles a query for a delegated subzone. These queries can be sent either to the subzone that is referred to in the query or to the list of forwarders that is named for the DNS server. Entries in the setting are used only when forwarding is enabled. Accepts the values:
|
/forwardingtimeout [<seconds>] |
Determines how many seconds (0x1-0xFFFFFFFF) a DNS server waits for a forwarder to respond before trying another forwarder. The default value is 0x5, which is 5 seconds. |
/globalneamesqueryorder [0|1] |
Specifies whether the DNS Server service looks first in the GlobalNames zone or local zones when it resolves names. Accepts the values:
|
/globalqueryblocklist[[<name> [<name>]...] |
Replaces the current global query block list with a list of the names that you specify. If you do not specify any names, this command clears the block list. By default, the global query block list contains the following items:
The DNS Server service can remove either or both of these names when it starts the first time, if it finds these names in an existing zone. |
/isslave [0|1] |
Determines how the DNS server responds when queries that it forwards receive no response. Accepts the values:
|
/localnetpriority [0|1] |
Determines the order in which host records are returned when the DNS server has multiple host records for the same name. Accepts the values:
|
/logfilemaxsize [<size>] |
Specifies the maximum size in bytes (0x10000-0xFFFFFFFF) of the Dns.log file. When the file reaches its maximum size, DNS overwrites the oldest events. The default size is 0x400000, which is 4 megabytes (MB). |
/logfilepath [<path+logfilename>] |
Specifies the path of the Dns.log file. The default path is %systemroot%\System32\Dns\Dns.log . You can specify a different path by using the format path+logfilename . |
/logipfilterlist <IPaddress> [,<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. |
/loglevel [<eventtype>] |
Determines which types of events are recorded in the Dns.log file. Each event type is represented by a hexadecimal number. If you want more than one event in the log, use hexadecimal addition to add the values, and then enter the sum. Accepts the values:
|
/maxcachesize | Specifies the maximum size, in kilobytes (KB), of the DNS server s memory cache. |
/maxcachettl [<seconds>] |
Determines how many seconds (0x0-0xFFFFFFFF) a record is saved in the cache. If the 0x0 setting is used, the DNS server doesn’t cache records. The default setting is 0x15180 (86,400 seconds or 1 day). |
/maxnegativecachettl [<seconds>] |
Specifies how many seconds (0x1-0xFFFFFFFF) an entry that records a negative answer to a query remains stored in the DNS cache. The default setting is 0x384 (900 seconds). |
/namecheckflag [0|1|2|3] |
Specifies which character standard is used when checking DNS names. Accepts the values:
|
/norecursion [0|1] |
Determines whether a DNS server performs recursive name resolution. Accepts the values:
|
/notcp | This parameter is obsolete, and it has no effect in current versions of Windows Server. |
/recursionretry [<seconds>] |
Determines the number of seconds (0x1-0xFFFFFFFF) that a DNS server waits before again trying to contact a remote server. The default setting is 0x3 (three seconds). This value should be increased when recursion occurs over a slow wide area network (WAN) link. |
/recursiontimeout [<seconds>] |
Determines the number of seconds (0x1-0xFFFFFFFF) that 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. Accepts the values:
|
/rpcprotocol [0x0|0x1|0x2|0x4|0xFFFFFFFF] |
Specifies the protocol that remote procedure call (RPC) uses when it makes a connection from the DNS server. Accepts the values:
|
/scavenginginterval [<hours>] |
Determines whether the scavenging feature for the DNS server is enabled, and sets the number of hours (0x0-0xFFFFFFFF) between scavenging cycles. 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. Accepts the values:
|
/sendport [<port>] |
Specifies the port number (0x0-0xFFFFFFFF) that DNS uses to send recursive queries to other DNS servers. The default setting is 0x0, which means that the port number is selected randomly. |
/serverlevelplugindll[<dllpath>] |
Specifies the path of a custom plug-in. When Dllpath specifies the fully qualified path name of a valid DNS server plug-in, the DNS server calls functions in the plug-in to resolve name queries that are outside the scope of all locally hosted zones. If a queried name is out of the scope of the plug-in, the DNS server performs name resolution using forwarding or recursion, as configured. If Dllpath is not specified, the DNS server ceases to use a custom plug-in if a custom plug-in was previously configured. |
/strictfileparsing [0|1] |
Determines a DNS server’s behavior when it encounters an erroneous record while loading a zone. Accepts the values:
|
/updateoptions <RecordValue> |
Prohibits dynamic updates of specified types of records. If you want more than one record type to be prohibited in the log, use hexadecimal addition to add the values, and then enter the sum. Accepts the values:
|
/writeauthorityns [0|1] |
Determines when the DNS server writes name server (NS) resource records in the Authority section of a response. Accepts the values:
|
/xfrconnecttimeout [<seconds>] |
Determines the number of seconds (0x0-0xFFFFFFFF) a primary DNS server waits for a transfer response from its secondary server. The default value is 0x1E (30 seconds). After the time-out value expires, the connection is terminated. |
Zone-level syntax
Modifies the configuration of the specified zone. The zone name must be specified only for zone-level parameters.
dnscmd /config <parameters>
Parameters
Parameters | Description |
---|---|
<parameter> |
Specify a setting, a zone name, and, as an option, a value. Parameter values use this syntax: zonename parameter [value] . |
/aging <zonename> |
Enables or disables scavenging in a specific zone. |
/allownsrecordsautocreation <zonename> [value] |
Overrides the DNS server’s name server (NS) resource record autocreation setting. Name server (NS) resource records that were previously registered for this zone are not affected. Therefore, you must remove them manually if you do not want them. |
/allowupdate <zonename> |
Determines whether the specified zone accepts dynamic updates. |
/forwarderslave <zonename> |
Overrides the DNS server /isslave setting. |
/forwardertimeout <zonename> |
Determines how many seconds a DNS zone waits for a forwarder to respond before trying another forwarder. This value overrides the value that is set at the server level. |
/norefreshinterval <zonename> |
Sets a time interval for a zone during which no refreshes can dynamically update DNS records in a specified zone. |
/refreshinterval <zonename> |
Sets a time interval for a zone during which refreshes can dynamically update DNS records in a specified zone. |
/securesecondaries <zonename> |
Determines which secondary servers can receive zone updates from the primary server for this zone. |