Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Applications / December 2005

Tip: Looking for answers? Try searching our database.

Need VB to move/assign EDB/STM locatin during creation with VBScri

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BrentDAmbro - 12 Dec 2005 17:36 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.