I've got a script to create Storage groups and mail stores. Unfortunately, it
defaults the EDB and STM locations to the same as the SG's logfiles. Does
anyone have script that can either assign the location of the STM and EDB
during creation of move them once they are created? I've found a function
using cdoexm, but no reliable examples.
Exchange 2003, SP1.
Much appreciated.
Steve - 13 Dec 2005 13:26 GMT
You can open up the Exchange SDK and look at the CDOEXM IMailBoxStoreDB
Interface's MoveDataFiles method.
Here's a snippet in VB .NET... you should be able to translate to
VBScript.
You can modify the location of the Storage Group's files using:
Dim SG As New CDOEXM.StorageGroupClass
SG.Name = "SG1"
SG.MoveLogFiles("D:\Logs\SG1")
SG.MoveSystemFiles(D:\Data\SG1")
SG.SaveTo(SGUrl)
You can modify the location of the Mail Store's files also:
Dim MD As New CDOEXM.MailboxStoreDBClass
MD.Name = "MD1"
MD.Enabled = True
MD.MoveDataFiles("D:\Data\MD1\MD1.edb","D:\Data\MD1\MD1.stm")
MD.SaveTo(MDBUrl)
MD.Mount()
Good Luck!
Steve