There will be times that you need to dismount a mailbox store on the fly. This could be for integrity checking, mailbox restorations, or to make email unavailable to some users for some reason. When you dismount a mailbox store, users with mailboxes in that store will be unable to retrieve their mail; users with mailboxes in other mailbox stores will be unaffected.
Using a graphical user interface
- Open the Exchange System Manager (ESM) snap-in.
- In the left pane, browse to the server and storage group that contains the mailbox store you want to manipulate.
- Right-click on the mailbox store and select Dismount Store.
- Click Yes when prompted to continue.
Using VBScript
' This code mounts/dismounts a Mailbox Store.
' ------ SCRIPT CONFIGURATION ------
strServer = "<Exchange Server>" ' e.g., ExchServer2 strSGName = "<Storage Group Name>" ' e.g., SG1 strMailStoreName = "<Database Name>" ' e.g., DB1 ' ------ END CONFIGURATION ---------' Find Storage Group URL strSearch = "CN=" & strSGName & "," set objSrv = CreateObject("CDOEXM.ExchangeServer") objSrv.DataSource.Open strServer for each sg in oSrv.StorageGroups if (instr(1,sg,strSearch,1)>0) then strSGUrl = sg next ' Generate Mailbox Store URL strMBUrl = "LDAP://CN=" & strMailStoreName & "," & strSGUrl ' Open Mailbox Store set objMb = CreateObject("CDOEXM.MailBoxStoreDB") objMb.DataSource.Open strMBUrl if (objMb.Status = 0) then Wscript.Echo "Mailbox store is mounted, dismounting..." objMb.Dismount else Wscript.Echo "Mailbox store is dismounted, mounting..." objMb.Mount end if Wscript.Echo "Script completed successfully."