Microsoft is quite clear about Microsoft Exchange and Active Directory being installed on the same server: don’t do it, it isn’t supported. The only exception to this rule is Small Business Server, where out of necessity you will find both running side by side.
Unfortunately, Microsoft didn’t feel the need to address one of the problems behind the bar in SBS: the shutdown hang. There is a good chance that if you go Start | Shutdown on an SBS server without any prior actions, the entire shut down process may take anything between 15 minutes and infinity to completed.
There is an easy to prevent this from happening is to shutdown all Exchange services prior to running Start | Shut Down. This is easy enough to do via a good old batch script, a copy of which is enclosed below.
To use, simply run the batch script prior to restarting or shutting down your SBS 2003 server.
ECHO Stopping Exchanging Services net stop MSExchangeES net stop IMAP4Svc net stop POP3Svc net stop RESvc net stop MSExchangeSRS net stop MSExchangeMGMT net stop MSExchangeMTA net stop MSExchangeIS /Y net stop MSExchangeSA /Y ECHO Services Stopped