The batch file

  • From: "Scott Van Singel" <svansingel@xxxxxxxxxxxxxxxxx>
  • To: <exchangelist@xxxxxxxxxxxxx>
  • Date: Thu, 6 Feb 2003 08:41:47 -0500

Ok group, 
 I think I got this to work the way I want it to. 
First you will need a copy of the Sleep.exe file that is in the Win2K
resource kit. Put this file in the c:\program files\exchsrvr\bin folder.

Here is what I Have for my batch file:
 
cd \
cd Program Files
cd exchsrvr
cd bin
REM Exchange Server Stop Services and defrag
Rem EmailStop.bat
net send * Email is going down! Save your work !!
Rem Delay for users to logoff
Sleep 60
Rem Stop Exchange Server 
Net send * Email Server is going down now !
Rem delay for 30 seconds
Sleep 30
Net Stop "Microsoft Exchange Information Store"
sleep 20
Rem now start defrag
eseutil /d "C:\Program Files\Exchsrvr\Mdbdata\mailbox store 2.edb" > "to
a folder of file that you want the out put to be IE: c:\email.txt"
 
Rem now start services
Net Start "Microsoft Exchange Information Store"
 
rem send message
net send * The Email server is now up and running. 
 
Pause ( I put this in so in the morning you can look at the dos prompt
and see if there were any problems running the program)
 
 
Now I know you can use different lines and different ways, but this is
my simple batch file. 
Next you can use the Schedule program and set a time or date for this
batch file to run. 
 
 
GOOD LUCK. 
Scott Van Singel 

Other related posts: