Stopping and Starting the DNS Server Service
There are a couple of options for stopping and starting the DNS server on Windows Server 2003. The net stop and net start commands have been around since theearly days of Windows NT and are commonly used to stop and startservices, if for no other reason than their availability andsimplicity. You specify the name of the service after the command tostop or start it. Here is an example of restartingthe DNS server in two steps using these commands:
C:\>net stop dns
The DNS Server service is stopping.The DNS Server service was stopped successfully.C:\>net start dns
The DNS Server service is starting.The DNS Server service was started successfully.
While these commands are certainly easy to use, theydon’t work on a remote server. If you need to stop,start, or restart the DNS server on a remote server,you’ll need to use the sc utility.
In Windows 2000, the sc utilitywas available in the Resource Kit. In Windows Server 2003,it’s installed with the operating system, like the syscomgr and net commands we described earlier.
Not only can sc be run againstremote servers, but it provides options to perform just about anyaction you would need to do against a service. To restart the DNSserver on a remote server named matrix, we would use the following commands:
C:\> sc \\matrix stop dns
SERVICE_NAME: dns TYPE : 10 WIN32_OWN_PROCESS STATE : 3 STOP_PENDING (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE ...