Stopping and starting Exchange consists of stopping and starting the Exchange related services through the Services MMC snap-in or the net stop/net start command-line utilities. See the “Discussion” of this recipe for the list of Exchange services.
Using GUI
- Open the Computer Management MMC snap-in (compmgmt.msc).
- Scroll to the service that you wish to manage, and click Stop, Start, or Restart.
Using a command-line
The following command will stop a service:
> net stop <ServiceName>
The following command will start a service:
> net start <ServiceName>
The following will stop and start a service in a single command:
> net stop <ServiceName> && net start <ServiceName>
Using VBScript
‘————-SCRIPT CONFIGURATION———————-
strComputer = “<ComputerName>”
strServiceName = “<ServiceName>”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” & strComputer _
& “\root\cimv2”)
Set colServiceList = objWMIService.ExecQuery _
(“Select * from Win32_Service where Name='” & strServiceName _
_ ‘”)
‘ The following code will start a service
For Each objService in colServiceList
errReturn = objService.StartService()
Next
‘ The following code will stop a service
For Each objService in colServiceList
errReturn = objService.StopService()
Next
Summary
There are several services involved with Exchange Server, and stopping different services will accomplish different things. The services are interdependent, so when you stop or start various services you may see a message about having to stop dependent services. If you do stop dependent services, don’t forget to restart them again when you restart the service that you began with.
To shut down Exchange completely on a given machine, you need to stop all of the following services:
Microsoft Exchange Event (MSExchangeES)
This service was used for launching event-based scripts in Exchange 5.5 when folder changes were detected. Exchange 2000 offered the ability to create Event Sinks directly, so this use of this service has decreased. This service is not started by default.
Microsoft Exchange IMAP4 (IMAP4Svc)
This service supplies IMAP4 protocol message server functionality. This service is disabled by default. To use IMAP4 you must enable this service, configure it to auto-start, and start the service.
Microsoft Exchange Information Store (MSExchangeIS)
This service is used to access the Exchange mail and public folder stores. If this service is not running, users will not be able to use Exchange. This service is started by default.
Microsoft Exchange Management (MSExchangeMGMT)
This service is responsible for various management functions available through WMI, such as message tracking. This service is started by default.
Microsoft Exchange MTA Stacks (MSExchangeMTA)
This service is used to transfer X.400 messages sent to and from foreign systems, including Exchange 5.5 Servers. This service was extremely important in Exchange 5.5, which used X.400 as the default message transfer protocol. Before stopping or disabling this service, review MS KB 810489. This service is started by default.
Microsoft Exchange POP3 (POP3Svc)
This service supplies POP3 protocol message server functionality. This service is disabled by default. To use POP3 you must enable this service, configure it to auto-start, and start the service.
Microsoft Exchange Routing Engine (RESvc)
This service is used for routing and topology information for routing SMTP based messages. This service is started by default.
Microsoft Exchange System Attendant (MSExchangeSA)
This service handles various cleanup and monitoring functions. One of the most important functions of the System Attendant is the Recipient Update Service (RUS), which is responsible for mapping attributes in Active Directory to the Exchange subsystem and enforcing recipient policies. When you create a mailbox for a user, you simply set some attributes on a user object. The RUS takes that information and does all of the work in the background with Exchange to really make the mailbox. If you mailbox-enable or mail-enable objects and they don’t seem to work, the RUS is one of the first places you will look for an issue. If you need to enable diagnostics for the RUS, the parameters are maintained in a separate service registry entry called MSExchangeAL. This isn’t a real service; it is simply the supplied location to modify RUS functionality. This service is started by default.
Microsoft Exchange Site Replication Service (MSExchangeSRS)
This service is used in Organizations that have Exchange 5.5 combined with Exchange 2000/2003. This service is not started by default.
Network News Transfer Protocol (NntpSvc)
This service is responsible for supplying NNTP Protocol Server functionality. This service is started by default.
Simple Mail Transfer Protocol (SMTPSVC)
This service is responsible for supplying SMTP Protocol Server functionality. This service is started by default.