Microsoft Exchange

Mailbox Health 2007.ps1

Description:

A Powershell Script based on the excellent Mailbox 2010 Health script that performs similar functionality for Exchange 2007 servers. Requires the NSClient or NSCP client on the Exchange server. See remarks in script for details.

Current Version

1.1

Last Release Date

2010-09-24

Compatible With

  • Nagios 2.x
  • Nagios 3.x

License

GPL


Project Files
Project Notes
Reviews (2) Add a Review
Good but some issues
by safurniss, October 31, 2013

I have this working great on Windows 2003 with Exchange 2007, however I seem to have an issue running it on Windows 2008 with Exchange 2007. If I run the command from the "nsclien++ /test" it works fine and the result comes back in a few seconds. If I run it from the command line on the Nagios server, again it works fine, just takes a lot longer to return the output. When I then run it as a Nagios check it fails with "(Service Check Timed Out)". I have the timeout set to 300 seconds. Not sure why it is failing on 2008.



Implementing Mailbox Health 2007
by s_teeter, October 31, 2010

This contribution is a useful tool for monitoring a mission-critical IT service, namely MS Exchange. However, I had to fix a few things to get it working in my environment. These points may save you some time: -- In the mbhealth2007.ps1 script, correct the typo in AddAdd-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin . Remove the extra "Add." Comment the first Write-Host command to avoid generating unwanted output. -- Owing to the way PowerShell handles exit codes, the Nagios status code did not work as suggested. Instead, in NSC.ini for NSClient++, under [External Scripts], add the line check_mailbox_health=cmd /c echo C:"Program Files"NSClient++scriptsmbhealth2007.ps1 ; exit($lastexitcode) | powershell.exe -noprofile -command - See http://powershell.com/cs/blogs/tips/archive/2009/05/18/returning-exit-code-from-script.aspx for more info on PowerShell exit codes. Actually the hardest part was finding out how to correctly quote "Program Files" in the NSC.ini file. After making those changes, the Mailbox health 2007 script is working fine in my environment.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (2)
Favorites
0
Views
104,172