Retrieves mailbox name, size in megabytes, and message count for each mailbox on an Exchange server and returns this data in a two-dimensional array
obj.GatherMailboxData(DataOut Variant, RowCount Long, [TopNN Long]) where obj is an McExchg.MailboxAnalyzer object
DataOut
|
Variant array that contains all mailbox information for a server. |
RowCount
|
The number of mailbox information rows returned. |
TopNN
|
Specifies that this method should only return rows with the top 'NN' mailboxes consuming resources, as measured by message count and mailbox size. |
Boolean.
To retrieve the top 100
mailboxes
using resources on the EXCHANGE1
Exchange server,
enter:
Set obj = CreateObject("McExchg.MailboxAnalyzer") If obj.LogonToMapi("EXCHANGE1", "OnePointOperations") Then If obj.GatherMailboxData(varData, lngRowCount, 100) Then For lngIndex = 0 to lngRowCount - 1 strMailbox = varData(0, lngIndex) lngMBUsed = varData(1, lngIndex) lngMsgCount = varData(2, lngIndex) ' Do something with mailbox information Next Else strError = obj.GetError() End If Else strError = obj.GetError() End If'
This example shows how to retrieve mailbox information.