Re: VB Script to dismount stores
- From: "james chong" <jamestechman@xxxxxxxxx>
- Date: 20 Nov 2006 19:22:27 -0800
If you must try this script.
Defragment the Exchange Information Store
http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange/cscem008.mspx
James Chong
Ralph Karam wrote:
I am looking to create some scripts so I can sleep at night instead of
watching my databases run through their offline defrags.
Servers are Ex2003 SP2
I have several databases and due to large mailbox moves and server
consolidation I ahve a great amount of whitespace to be recovered.
I purchased an O'Reilly exchange cookbook and found the dismount script.
' This code will dismount the selected mailbox database.
' ------ SCRIPT CONFIGURATION ------
strServerName = "batman" ' e.g., "BATMAN"
strMDBName = "batman-store" ' e.g., "Mailbox Store (BATMAN)"
' ------ END CONFIGURATION ---------
Set theServer = CreateObject("CDOEXM.ExchangeServer")
Set theMDB = CreateObject("CDOEXM.MailboxStoreDB")
theServer.DataSource.Open strServerName
arrSG = theServer.StorageGroups
theFirstSG = arrSG(0)
strURL = "LDAP://" & theServer.DirectoryServer & "/cn=" & strMDBName & "," &
theFirstSG
theMDB.DataSource.Open strURL
theMDB.Dismount
WScript.Echo "Database dismounted."
I changed the server and store names but when I run the script I get an error
"There is no such object on the server"
Line 15 Char 1
Any guidance would be greatly appreciated
.
- Follow-Ups:
- Re: VB Script to dismount stores
- From: Andy David - MVP
- Re: VB Script to dismount stores
- Prev by Date: Re: not being able to receive external email form one company
- Next by Date: Re: OOO Reply not going to external email addresses
- Previous by thread: Re: VB Script to dismount stores
- Next by thread: Re: VB Script to dismount stores
- Index(es):
Relevant Pages
|