Is there a way to determine the mailbox breakdown for the entire Information Store? I want to be able to see the total items and MB for the Inbox, Deleted Items, Sent Items, etc. I'd also like to break it down by user for that same info.
I've found out that much, so I can at least see what each individual's mailbox size is. But I'd like to be able to see how much of the database is being consumed by Deleted Items that no one seems to empty out. I know I can force a cleaning of the Deleted Items but management is against this (as usual). If I could determine the biggest offenders I might be able to do something about it on a user by user basis.
As a bonus, I'd like to find out about attachments, since many people are sharing video files (and you know how that goes). I know I can block that too but once again management blocks that course of action.
Yes, but I posted that link as its CDO. There was a guy on OutlookExchange.com who made an Access database to get all of this info on a daily basis with cool reports all in Access. I've covered it in this forum and the Exchange 2000 forum several times over the past few years but I can't find it on their site now. I can't even remember the gus name.
The easiest way of doing this is to reenable the virtual drive M and then drill into it using a script. I wouldn't alter anything in there though.
We use a script below to count the number of items in the inbox and sent items by accessing the folder properties and then push the contents into a sql database.
On error resume next
Dim ConnLogin
Dim Username
Dim MailNickNameEx
Dim StoreInboxPath
Dim StoreSentItemsPath
Dim InboxItemsCount
Dim SentItemsCount
Dim StrSqlP1
Dim StrSqlP2
Dim StrSqlM1
set ConnLogin = CreateObject("ADODB.Connection") 'Define SQL Connection
ConnLogin.Open = "Provider=SQLOLEDB;Data Source=SQLSERVER;Initial Catalog=PCAudit;Uid=USER;pwd=PASSWORD" 'Open SQL connection for Input
StrSqlP1 = "INSERT into PCAudit.dbo.MailboxProcess (ProcessTypeDB, LastUpdate) VALUES ('Started', GetDate())"
ConnLogin.Execute StrSqlP1 'Record the process start
'wscript.echo StrSqlP1
Set objConnection = CreateObject("ADODB.Connection") ' Open ADODB Connection
Set objCommand = CreateObject("ADODB.Command") ' Open ADODB Command
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objcommand.CommandText = "<LDAP://dc=DOMAINNAME,dc=Com>;(&(objectCategory=User)" & "(userAccountControl:1.2.840.113556.1.4.803:=0));mailNickName,sAMaccountname;Subtree"
' The =0 section at the end of the search string returns only enabled users. Changing this to =2 will only return disabled users.
' ObjectCategory=User only returns objects that are users.
' mailnickname is the only field we are interested in returning into the recordset.
set objrecordset = objcommand.Execute 'Open Active Directory and retrieve only users
Set objFSO = CreateObject("Scripting.FileSystemObject") 'Open the file system
objrecordset.movefirst
do until objrecordset.EOF
Username = "" 'Clear Variables
MailnickNameEx = ""
StoreInboxPath = ""
StoreSentItemsPath = ""
InboxItemCount = 0
StoreSentItemsCount = 0
MailNickNameEx = objRecordSet.Fields("mailNickName")
Username = objRecordSet.Fields("sAMaccountname")
If username <> "" Then 'Ignore users with no mail nickname
If MailNickNameEx <> "" Then
StoreInboxPath = "M:\DOMAINNAME.CO.UK\MBX\" & MailNickNameEx & "\Inbox" 'setup path to inbox
StoreSentItemsPath = "M:\DOMAINNAME.CO.UK\MBX\" & MailNickNameEx & "\Sent Items" 'setup path to sent items
Set objFolder = objFSO.GetFolder(StoreInboxPath)
InboxItemCount = objFolder.Files.Count 'Count Inbox Items
Set objFolder = objFSO.GetFolder(StoreSentItemsPath)
SentItemCount = objFolder.Files.Count 'Count Sent Items
StrSqlM1 = "INSERT into PCAudit.dbo.MailBoxFolderCount (UsernameDB, MailNickNameDB, InboxItemCountDB, SentItemsCountDB, LastUpdate) VALUES ('" & Username & "','" & MailNickNameEx & "','" & InboxItemCount & "','" & SentItemCount & "', GetDate())"
'wscript.echo StrSqlM1 'Use In Debug
ConnLogin.Execute StrSqlM1 'Record Data into SQL
End If
End If
objrecordSet.MoveNext
Loop
StrSqlP2 = "INSERT into PCAudit.dbo.MailboxProcess (ProcessTypeDB, LastUpdate) VALUES ('Finished', GetDate())"
ConnLogin.Execute StrSqlP2 'record process finishing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.