One of the few services in Windows Server 2003 that can be completly managed by the command line is the DNS Server service. The DNS Server service can be installed, configured, managed, repaired and removed all using a set of command line tools included in the base OS.
Install/Uninstall
Create an answer file with the following text in notepad: [netoptionalcomponents] dns=1 A setting of 1 will specify installation while changing it to 0 would trigger the uninstall. Once you are done save the file as install_dns.txt and then run to following command: C:\> sysocmgr /i:%SystemRoot%\inf\sysoc.inf /u:c:\install_dns.txt DNS Server service is now ready to be configured! Stopping and Starting the DNS Server Service There are two sets of commands you can use to stop and start the DNS Server service (or any other service). Most of us are familiar with net stop servicename and net start servicename but there is another command you can use to stop services on remote computers. The sc command is built into Windows Server 2003 (for Windows 2000 it is in the Resource Kit) and can be used to perform a number of tasks against services on remote computers. A few examples of how we can use this to manage our DNS Server service are: sc \\servername stop dns sc \\servername start dns Configure and Manage DNS Probably the most powerful DNS command line tool is dnscmd. With dnscmd you can manage the dns server and do everything from list all zones on the DNS Server: dnscmd domain.com /enumzones Enable forwarders and set forwarder IP addresses: dnscmd servername /resetforwarders 10.0.0.4 10.0.0.15 Or disable forwarders dnscmd servername /resetforwarders There are A LOT of options, I urge you to run dnscmd /? and check them out. Troubleshoot DNS There are a variety of tools that can be used to troubleshoot DNS. Nslookup is one of the basic tools that allows you to look up DNS records and perform zone transfers. Ipconfig can be used to display and register DNS records as well as flush the local DNS cache. These are the basic tools you can use to manage your DNS servers, there are more and I will be going into more depth with them in future articles. Stay tuned! For more information see: DNS Tips Command Line Reference Resource Kit