[ExchangeList] Re: Get Store Size Script?

  • From: "Harding, Devon" <dharding@xxxxxxxxxxxxxxxx>
  • To: <exchangelist@xxxxxxxxxxxxx>
  • Date: Thu, 7 Aug 2008 11:39:54 -0400

They both work fine except with one issue.  If there is a Recovery
Storage Group with the DB files missing, the script crashes with the
following error:

 

  Storage group: Recovery Storage Group

    Store: Regular

      EDB file: F:\Recover\log\Regular.edb

Microsoft VBScript runtime error (70, 4) : File not found   

 

Is there any way around this?  Any way to skip this and continue?

 

-Devon

 

From: exchangelist-bounce@xxxxxxxxxxxxx
[mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of Michael B. Smith
Sent: Thursday, August 07, 2008 10:52 AM
To: exchangelist@xxxxxxxxxxxxx
Subject: [ExchangeList] Re: Get Store Size Script?

 

Wow. That uses cdoexm and has to run on an Exchange 2003 server. Here is
mine that does something similar:

 

http://theessentialexchange.com/blogs/michael/archive/2007/11/13/finding
-disk-space-used-by-exchange.aspx

 

Note that they BOTH suffer from a bug when you have an Exchange 2007
server in your organization. Exchange 2007 no longer has an SLV file
(also known as an STM file) and these scripts don't take that into
account.

 

That one has the nice feature of totaling up all the log files currently
in use.

 

Here is a patch for mine. Find this code:

 

   e Space (6) & "SLV file: " & obj.Get ("msExchSLVFile")
   s = obj.Get ("msExchSLVFile")
   strFile = "\\" & strServer & "\" & _
    Left (s, 1) & "$" & Mid (s, 3)
   Set objFile = objFSO.GetFile (strFile)
   e Space (6) & "Size: " & _
    FormatNumber (objFile.Size / (1024 * 1024), 0) & _
    " megabytes"
   storeTotal = storeTotal + (objFile.Size / (1024 * 1024))

replace it with this:

 

                On Error Resume Next

                s = obj.Get("mxExchSLVFile")

                If Err = 0 Then

e Space (6) & "SLV file: " & s
strFile = "\\" & strServer & "\" & _
    Left (s, 1) & "$" & Mid (s, 3)
Set objFile = objFSO.GetFile (strFile)
e Space (6) & "Size: " & _
    FormatNumber (objFile.Size / (1024 * 1024), 0) & _
    " megabytes"
storeTotal = storeTotal + (objFile.Size / (1024 * 1024))

                End If

                On Error Goto 0

 

I should redo this in PowerShell. Much easier to do.

 

Regards,

 

Michael B. Smith

MCITP:SA,EMA/MCSE/Exchange MVP

http://TheEssentialExchange.com

 

From: exchangelist-bounce@xxxxxxxxxxxxx
[mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of James Chong
Sent: Thursday, August 07, 2008 9:28 AM
To: exchangelist@xxxxxxxxxxxxx
Subject: [ExchangeList] Re: Get Store Size Script?

 

Try this.

 

List Microsoft Exchange Servers

http://www.microsoft.com/technet/scriptcenter/csc/scripts/email/exchange
/cscem065.mspx

 

 

'this script will report all the database sizes for all exchange servers
in your forest

 

 

 

James Chong
Sr. Systems Engineer
Simplexity, LLC.

11130 Sunrise Valley Drive, Suite 300

Reston, VA 20191
O (703) 657-4612
C (703) 863-1483

 

From: exchangelist-bounce@xxxxxxxxxxxxx
[mailto:exchangelist-bounce@xxxxxxxxxxxxx] On Behalf Of Harding, Devon
Sent: Thursday, August 07, 2008 9:08 AM
To: exchangelist@xxxxxxxxxxxxx
Subject: [ExchangeList] Get Store Size Script?

 

Does anyone know of a script that will get the store size of ALL my
Exchange servers in my org?

 

Devon Harding

Windows Systems Engineer

Southern Wine & Spirits - BSG

954-602-2469

 

 

________________________________

This message is the property of Southern Wine & Spirits or its
affiliates. It is intended only for the use of the individual or entity
to which it is addressed and may contain information that is non-public,
proprietary, privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product. If you are
not the intended recipient, you are hereby notified that any use,
dissemination, distribution, or copying of this communication is
strictly prohibited. If you have received this communication in error,
notify us immediately by telephone and (i) destroy this message if a
facsimile or (ii) delete this message immediately if this is an
electronic communication. 
Thank you. 

Other related posts: