dnscmd Zone Commands

Over half of the dnscmd command options relate to configuring or querying zones.

/AgeAllRecords <ZoneName> [<NodeName>] [/Tree] [/f]

In order for resource records to be scavenged after a period of time, a timestamp must be associated with the record. The /AgeAllRecords command allows you to set the current time as the timestamp for all records in a zone, or for a specific node in a zone. The node name can be any node in the zone, @ to represent all records, or the name of a subdomain. If you specify a subdomain for the node, use the /tree option to set a timestamp on all records in the subdomain.

By default, you are prompted for confirmation before records are aged. To disable this prompt, use the /f option.

This example shows how to age all resource records in the cgi subdomain of the fx.movie.edu zone:

C:\> dnscmd /ageallrecords fx.movie.edu cgi /tree
                     
/Config <ZoneName> /<PropertyName> [<PropertyValue>]

This command configures settings for both name servers and zones. To configure zone settings, specify the zone name followed by the property name and value (if necessary).

This example turns on aging for the fx.movie.edu zone:

C:\> dnscmd /config fx.movie.edu /aging
                     
/EnumZones [<Filters>]

This command lists the zones stored on a server. Several filter options are available if you want to view a subset of zones. These include: /Primary, /Secondary, /Forwarder, /Stub, /Cache, /Auto-Created, /Forward, /Reverse, /Ds, /File, /DomainDirectoryPartition, /ForestDirectoryPartition ...

Get DNS on Windows Server 2003, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.