Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET:IT Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET
DNS

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

Say Goodbye to Traditional PC Lifecycle Management

Traditional IT tools, including Microsoft SCCM, Ghost Solution Suite, and KACE, often require considerable custom configurations by T3 technicians (an expensive and often elusive IT resource) to enable management of a hybrid onsite + remote workforce. In many cases, even with the best resources, organizations are finding that these on-premise tools simply cannot support remote endpoints consistently and reliably due to infrastructure limitations.

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 192.168.1.100 in the dpetri.net zone on srv1.dpetri Windows Server 2003:

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

To manually force zone replication:

​Dnscmd server_name /ZoneRefresh zone_name

Links

Download Windows 2000 SP4 Support Tools (11.24mb)

Related Topics:

DNS
Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: