Showing results for 
Search instead for 
Did you mean: 

Powershell: Monitoring Exchange Journal Mailboxes

Hello EV Admins

Attached is a custom powershell script written by myself to monitor health of journal mailboxes in our environment like Number of items, size of database, oldest/newest items etc.

The script generages HTML report using various parameters and sends over email to configured recipients via any SMTP server which has Anonymous authentication supported using any from address liked.

The powershell script is tied to a bat file which is configured in task scheduler to run every x number of hours accordingly.

We use journaling closely along with DA so the email reports on timely manner help us stay ahead of the game. Hence sharing. Hope it helps your environment too.

4 Replies

Forgot to Mention...

Forgot to mention, you'll need to edit below lines to fit your environment:

 $dbs = Get-MailboxDatabase -Status -Server ""

Since we've only 1 journal server, I used direct parameter, you can hook in a txt file with list of serers and use for loop to cover multiple (like below)

 foreach ($machineName in $serverlist) 
 $Mailbox = Get-Mailbox -Server $machinename -ResultSize Unlimited
 $dbs = $status | foreach-Object {Get-MailboxDatabase $_.DatabaseName -Status}
 foreach($db in $dbs)


where $serverlist is the txt file.

Also you'll need to edit below line:

sendEmail "Contoso Exchange Journal Report" $fileName

In above or sample code, is FROM, is TO, Contoso Exchange Journal Report is SUBJECT, is SMTP server with anonymous authentication.

You can send to multiple recipients too by separating them using ",",

Add this as an article and

Add this as an article and some screenshots and you will get more points for it :) Good job!!

Re: Powershell: Monitoring Exchange Journal Mailboxes

Hi, @AKL

Thanks for the script.

Somehow it does not work for Exchange Server 2013 ?

Would you be able to update it, please?

Only Database Name, Server and Database File column are populated.

Re: Powershell: Monitoring Exchange Journal Mailboxes

Great script. This script assumes that each database has only one journaling mailbox. Have modified it accordingly to update for multiple mailboxes on different rows.