If you've ever had to restart your Exchange server for any reason (and you likely have), then you've probably noticed...
how long it can take.
As a general rule, any server that is functioning as an Exchange server takes longer to restart than a comparable server performing other tasks. Member servers hosting an Exchange installation take slightly less time to restart than does a DC/GC hosting an Exchange installation, but the restart time is still lengthy compared to most other servers you are likely to work with.
The key to this problem lies in the shutdown of the Exchange services. If you don't want to wait 10 minutes or even longer in some cases, you can force the issue by stopping the Exchange services yourself and then initiating the restart. I've included a sample batch file that you can use to perform a quicker restart on your Exchange Server 2003 servers.
REM Restart Exchange Server 2003 faster
REM Batch file 2004 by Will Schmied (www.mcseworld.com) for SearchExchange.com
REM You can remove entries that pertain to services not running on your Exchange Server
REM You can change many of the options in the shutdown.exe command to suit your needs
REM ** Stopping Exchange Server typical services **
REM Stopping the Microsoft Exchange Information Store service
sc stop MSExchangeIS
REM Stopping the Microsoft Exchange MTA Stacks service
sc stop MSExchangeMTA
REM Stopping the Microsoft Exchange System Attendant service
sc stop MSExchangeSA
REM Stopping the Microsoft Exchange Routing Engine service
sc stop RESvc
REM Stopping the Microsoft Exchange Management service
sc stop MSExchangeMGMT
REM Stopping the Microsoft Search service
sc stop MSSEARCH
REM ** Stopping Exchange Server specialty services **
REM Stopping the Microsoft Exchange IMAP4 service
sc stop IMAP4Svc
REM Stopping the Microsoft Exchange POP3 service
sc stop POP3Svc
REM Stopping the Microsoft Exchange Site Replication Service
sc stop MSExchangeSRS
REM Stopping the Microsoft Exchange Event service
sc stop MSExchangeES
REM ** Restarting server in 45 seconds, force close running applications **
shutdown /r /t 45 /f /d p:0:0 /c "Restarting Exchange Server"
My results: less than half the time
On my test server, a normal restart (immediately following a clean startup with no errors) took 12 minutes and 40 seconds to complete from the time I clicked OK after entering the reason in the Shutdown Tracker to the time the logon prompt was available. By comparison, when using the script (again, immediately following a clean startup with no errors), the restart took 5 minutes and 15 seconds to perform from the time I initiate the script to the time the logon prompt was available.
The test server I used was not one that you would consider production quality. It contained a Pentium 4 1.6 GHz CPU, 768 MB of PC 2100 DDR RAM and a single 60 GC EIDE 7,200 RPM hard drive. The server is configured as a Windows Server 2003 DC, GC and Exchange Server 2003 server. One storage group with two stores exists, with each store less than 30 MB in total size.
Even though this is hardly a production quality server, it does serve well to illustrate that you can achieve quicker Exchange Server restarts by using some simple scripting.
Will Schmied, BSET, MCSE, MCSA, is a systems engineer for a Fortune 500 shipping and transportation company. As a freelance writer, Will has written for Microsoft, Pearson, Sybex, Syngress, TechTarget, CNET, msexchange.org and several other organizations. Will has also worked with Microsoft in the MCSE exam-development process. You can visit Will at his MCSE certification portal, www.mcseworld.com.