Command-Line Utilities
In this section, I'll describe some useful programs designed to run from a command line that you can use to automate your DNS setup and configuration processes.
DNSCmd
The Windows Server 2008 Support Tools collection, described earlier in the book, contains the DNSCmd utility, which is a great way to access some command DNS configuration-related functions through the power and speed of the command prompt. To get to DNSCmd, look in the Support\Tools directory on the Windows Server 2008 distribution CD for the file support.cab. Inside, copy and paste DNSCmd to a convenient location.
DNSCmd displays and changes the properties of DNS servers, zones, and resource records. 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.
DNSCmd can be used in any of the following situations, in which you want to:
Retrieve information about a DNS server
Begin the scavenging process
View information and contents of a DNS zone
Create, remove, or "pause" zones
Change the properties of a zone
Add, delete, and enumerate records in a zone
You use DNSCmd simply by specifying attributes and their values as part of a command. For example, to create a new ...