Answered by:
Query total daily message

Question
-
we have a journal mailbox set for each mailbox database. Enterprise Vault journaling is slow and the support is asking to create more journal mailboxes for the database. But I'd like to get an inventory for daily total email volume in and out of all database. Any advice how to get that? I found a script to inventory average mail volume per mailbox. But like to see if there is one to get me the total.
Thanks,
Answers
-
Hi,
I am writing here to confirm with you how thing going now?
If the above suggestion helps, please be free to mark it as an answer for helping more people.
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Marked as answer by ChrisD0919 Friday, November 22, 2019 3:06 AM
All replies
-
Hi,
This script will be useful to you:
Before using this script, you need to modify the value of "Database"
$From = "11/13/2019" $To = "11/15/2019" $intSent = 0 $intSentSize = 0 $intRec = 0 $intRecSize = 0 $Mailboxes = Get-Mailbox -ResultSize unlimited -Database "YourDatabse" | where {$_.RecipientTypeDetails -eq "UserMailbox"} foreach ($Mailbox in $Mailboxes){ Get-TransportService | Get-MessageTrackingLog -Sender $Mailbox.PrimarySmtpAddress -ResultSize Unlimited -Start $From -End $To | ForEach { If ($_.EventId -eq "RECEIVE" -and $_.Source -eq "SMTP") { $intSent ++ $intSentSize += $_.TotalBytes } } Get-TransportService | Get-MessageTrackingLog -Recipients $Mailbox.PrimarySmtpAddress -ResultSize Unlimited -Start $From -End $To | ForEach { If ($_.EventId -eq "DELIVER") { $intRec ++ $intRecSize += $_.TotalBytes } } } $intSentSize = $intSentSize/1MB $intSentSize = '{0:n4}' -f $intSentSize $intRecSize = $intRecSize/1MB $intRecSize = '{0:n4}' -f $intRecSize Write-Host "`nResult:`n--------------------`n" Write-Host "Total Sent:"$intSent, ", Total Sent Size(MB):"($intSentSize) Write-Host "Total Receive:"$intRec, ", Total Receive Size(MB):"($intRecSize) Write-Host "`n--------------------`n"
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Proposed as answer by Kyle.XuMicrosoft contingent staff, Moderator Tuesday, November 19, 2019 8:50 AM
-
-
use in-place-hold instead of journaling. It's better.
take a look auf Franky's Exchange Reporter. It's a very very good report. Work's fine. You can run the Script in english.
https://www.frankysweb.de/exchange-reporter-2013/
take a look of the reports :-)
-
Thanks for the script. Looks like the script is targeted to each database. I have about 70 database. Is there a script which would generate a report for the whole Org?
Thanks,
Remove “ -Database "YourDatabse"” from that script.
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Proposed as answer by Kyle.XuMicrosoft contingent staff, Moderator Friday, November 22, 2019 3:03 AM
-
Hi,
I am writing here to confirm with you how thing going now?
If the above suggestion helps, please be free to mark it as an answer for helping more people.
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
- Marked as answer by ChrisD0919 Friday, November 22, 2019 3:06 AM
-