Learn What IT Pros Need to Know About Windows 11 - August 24th at 1 PM ET! Learn What IT Pros Need to Know About Windows 11 - August 24th at 1 PM ET!

How can I easily administer DNS servers by using the command prompt?

A GUI interface is great for novice administrators but is cumbersome if you have to perform the same task over and over again. Command line tools can be more efficient than GUI tools. Dnscmd.exe is one of the support tools from Support.cab, which is located in the support’tools directory on the Windows 2000 CD.

Dnscmd is provided as a command-line interface for managing DNS servers. This tool can be used to script batch files, to help automate management and update of existing DNS server configurations or to perform setup and configuration of new DNS servers on your network.

DNSCmd displays and changes the properties of DNS servers, zones, and resource records. It manually modifies these properties, creates and deletes zones and resource records, and forces replication events between DNS server physical memory and DNS databases and data files. Some operations of this tool work at the DNS server-level while others work at the zone-level.

You can use Dnscmd on any Windows 2000 or XP computer as long as the user that is running the application is a member in the Administrators or Server Operators group on the target computer. Both the user account and the server computer must be members of the same domain or reside within trusted domains.

Sponsored Content

Read the Best Personal and Business Tech without Ads

Staying updated on what is happening in the technology sector is important to your career and your personal life but ads can make reading news, distracting. With Thurrott Premium, you can enjoy the best coverage in tech without the annoying ads.

Dnscmd.exe can be used to:

  • Get DNS server info;
  • Initiate server scavenging;
  • Enumerate and view zone info;
  • Create, delete, pause, and resume zones;
  • Change zone type (standard primary, standard secondary, AD integrated);
  • Add, delete, and enumerate records in a zone.

For example, to create a new standard primary zone called dpetri.net on a server named srv1.dpetri.net and stored in dpetri.net.dns files:

​dnscmd srv1.dpetri.net /ZoneAdd dpetri.net /Primary /file dpetri.net.dns

The syntax for adding DNS A records is similar:

​Dnscmd server_name /RecordAdd zone_name computer_name A IP_address

To add an A record for comp1 with an IP address of in the dpetri.net zone on srv1.dpetri Windows Server 2003:

​Dnscmd srv1.dpetri.net /RecordAdd dpetri.net comp1 A

To manually force zone replication:

​Dnscmd server_name /ZoneRefresh zone_name


Download Windows 2000 SP4 Support Tools (11.24mb)

Related Topics:


Register for Advanced Microsoft 365 Day!

GET-IT: Advanced Microsoft 365 1-Day Virtual Conference - Live August 24th!

Join us on Tuesday, August 24th and hear from Microsoft MVPs and industry experts about how to take advantage of Microsoft 365 at a technical level and dive deep into the features and functionality that will make your environment more secure and compliant.


Sponsored By