Home > Microsoft Exchange Tips > Exchange Server Administration Tips > Simple scripting gets Exchange Server moving
Exchange Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

EXCHANGE SERVER ADMINISTRATION TIPS

Simple scripting gets Exchange Server moving


Will Schmied
05.18.2004
Rating: -4.20- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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.

Try this:

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.

Rate this Tip
To rate tips, you must be a member of SearchExchange.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Exchange Server Administration Tips
Microsoft Exchange Server mailbox recovery using database portability
Plan an Exchange 2007 standby continuous replication (SCR) deployment
Set up messaging records management (MRM) in Exchange Server 2007
How Microsoft's new support policy for virtualized Exchange will affect you
Why too much memory can hurt Exchange Server 2007 performance
Microsoft Exchange Server backup method pros and cons
Migrating .PST files to an Exchange Server information store
Virtualizing Exchange Server 2007 with Microsoft's Hyper-V
Configure SMTP connection limits in Exchange Server 2003 and SBS
Five Microsoft Exchange Server backup worst practices

Microsoft Exchange Server Scripts and Programming
Exchange event sink scripting error when configuring email disclaimer
EMS add-on tool generates graphical Exchange Server 2007 reports
A primer on the Exchange Server 2007 Exchange Management Shell
How to generate HTML reports with the Exchange Management Shell (EMS)
Use the Exchange Management Shell Set command to block senders
How to test Exchange Management Shell commands
Grant or deny permissions to access a user's Exchange 2007 mailbox
Control query results with Exchange Management Shell's Format command
How to use Exchange Management Shell's Filter command
How to use the Exchange Management Shell command syntax

Microsoft Exchange Server 2003
Microsoft Exchange Server mailbox recovery using database portability
Recovering an Exchange Server 2003 store on a disaster recovery box
Creating disk space for an Exchange Server 2003 priv1.edb database
How to lock down an SMTP relay to prevent spam in Exchange Server 2003
Tool helps identify inbound Exchange Server email flow issues
Configure SMTP relay restrictions in Exchange Server 2003 to stop spam
Microsoft Exchange Server backup method pros and cons
Why can't I send Exchange email from a BlackBerry 7100i mobile device?
Tools to bulk modify Active Directory users in Exchange Server 2003
Tools and methods for disabling IMAP and POP in Exchange Server 2003
Microsoft Exchange Server 2003 Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
application program interface  (SearchExchange.com)
event sink  (SearchExchange.com)
synchronous groupware  (SearchExchange.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2004 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts