June 2005
Intermediate to advanced
464 pages
13h 2m
English
You need to remove a database you no longer need.
Launch the Exchange System Manager (Exchange System Manager.msc).
In the left pane, expand the appropriate Administrative Groups container, and then expand the Servers container.
Expand the server that contains the target database, then expand the parent SG.
Right-click the target database and choose Delete.
ESM will display a confirmation dialog to ask if you really want to delete the selected store. Click Yes to delete the store or No to leave it alone.
ESM will display a dialog reminding you to remove the database files manually from disk. Click OK to dismiss this.
' This code removes the specified mailbox database from its ' parent storage group without touching the on-disk files ' ------ SCRIPT CONFIGURATION ------ strServerName = "<serverName>" ' e.g., "BATMAN" strMDBName ="<mdbName>"' ------ END CONFIGURATION --------- Set theServer = CreateObject("CDOEXM.ExchangeServer") ' To delete a public folder database here, just change this class ref ' to CDOEXM.PublicStoreDB Set theMDB = CreateObject("CDOEXM.MailboxStoreDB") ' bind to the Exchange server and build the database URL theServer.DataSource.Open strServerName arrSG = theServer.StorageGroups theFirstSG = arrSG(0) strURL = "LDAP://" & theServer.DirectoryServer & "/cn=" & strMDBName & "," & theFirstSG theMDB.Name = strMDBName theMDB.DataSource.Open strURL theMDB.DataSource.Delete WScript.Echo ...