Zachary Loeber

The personal website of Zachary Loeber.

Exchange 2010: Poor Man’s Monitoring

I quietly released a new script into the wild the other day, Troubleshoot-MailboxServer.ps1. This script is meant for monitoring, fixing, and reporting on Exchange 2010 database servers. It pretty much just wraps around and reports on troubleshooting scripts found in %ExchangeInstallPath%Scripts. I also set it so you can have an email sent including warning/error color coded report upon completion.

Optionally, an overall system health overview can be sent following any warnings/errors which are generated from the scripts. This last report is purely optional and is actually just another person’s script which I rolled into Troubleshoot-MailboxServer.ps1. This report has some external requirements though. The original author’s release of the script can be read here. The external requirements are MS Chart Controls for .Net 3.5. So if you are not wanting to install these requirements on your Exchange server then make certain to set $SendSystemReport to $false.

The scripts which Troubleshoot-MailboxServer.ps1 calls are as follows:

More information about the Exchange 2010 Troubleshooters can be found here.

For good measure I tossed in the option to redistribute your DAG(s) with RedistributeActiveDatabases.ps1.

Be cautioned that, although this script does have a “testing” mode, it does not prevent the troubleshooter scripts from disabling provisioning of mailboxes to databases as that feature is not available as part of the troubleshooter scripts. Should you find that databases have become unprovisionable and you want the ability to provision to them again you need to run the following from an Exchange 2010 management shell:

Set-MailboxDatabase <database name> -IsExcludedFromProvisioning:$false

In Exchange 2010 SP1 the CheckDatabaseRedundancy.ps1 script is included and scheduled to automatically run. Apparently they used ManageScheduledTask.ps1 (which is also new to SP1) to automate scheduling the task. As when you use ManageScheduledTask.ps1 the description given to any new scheduled task you create with it reads that it is a task for checking database redundancy J. Regardless, you can use that script to schedule Exchange-DatabaseMonitoring.ps1.

cd $exscripts
.\ManageScheduledTask.ps1 -Install -ServerName <Your Server> -PsScriptPath C:\Scripts\Troubleshoot-MailboxServer.ps1 -TaskName "Troubleshoot Exchange 2010 Mailbox Servers"

(Note: this adds the scheduled task as a generic task, you will still need to go into scheduled tasks  and set a schedule for it to run and add change the description).

Download the script: Troubleshoot-MailboxServer.ps1


From here

comments powered by Disqus