|
04 December 2008
A domain controller that is also running Microsoft Exchange Server will take a very long time to shut down because it is trying to replicate with AD. The problem is that the Ad services are a lot quicker to shut down and will happen before Exchange tries to do this replication.
Microsoft has identified this as a known issue in KB555025 and suggest several options:
- Shut down the Exchange services before shutting down the server - this really is the best option, for reasons specified below
- Change the WaitToKillServiceTimeout to a lower number. This should be avoided as the services should be allowed to stop in the proper way
I like to create a batch file which stops the Exchange services and set a local policy which runs this script at shut down. Here is the batch file I use, save this on a local disk somewhere on the server:
net stop MSExchangeES /y
net stop MSExchangeIS /y
net stop MSExchangeMTA /y
net stop MSExchangeSA /y
net stop WinHttpAutoProxySvc /y
Then use the Group Policy Editor to configure the server to execute this batch file:
- Type gpedit.msc into the Run dialog
- Go into Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)
- Right click on "Shutdown" and select Properties
- Click Add, browse to the batch file you created, and click OK until you're done



