Learn Exchange the Guru way !!!


Exchange 2013: Health Check Script

Health check is most important to do to prevent any production outage and data loss. I have come cross a great script which is going to help you in reducing your effort so make use of it and sip your coffee in peace.

This script was originally written by Manish Sharma for Exchange 2007 then modified by Powershell MVP Vikas Sukhija for Exchange 2010. Vikas is not limited to Powershell but he also manages Sharpoint, Lync and Active Directory.

Now I have tested and modified many things in it for exchange 2013 and ease of system admins. I am republishing it.

This script will give you 2 outputs as shown below:

  1. Email output: Script will send an email to your designated email address with content in the body of the email.

health report email


2. Attachment: Script will one htm file which will be attached to the email as well. At this same time this file will be located in the mentioned directory.

healthreport htm file

Point to remember is to run the script from the same directory where we have copied the script. It means you have to change the directory before running the script.

When you will download the script, it is ready to be used with your inputs and couple of changes.

Download the script from here. –

Changes: There are 2 changes required.


  1. Right click and select edit.
  2. Update the report file path. It should be the same path as script directory

            $reportpath “c:temp2013Report.htm”

    3. Update one of the Exchange mailbox role server’s powershell virtual directory internalurl here

                 $url “”

     4. Save the script and run it from Exchange management shell


Input: When you will run the script, following 3 inputs will be required to send the report.

  1. SMTP server FQDN
  2. Sender email id
  3. Recipient email id


You can add this script to the scheduled task and schedule to run it as per company’s health check policy.

If you like the script and decided to run it every day then it is better to update the following 3 parameter as well. Then add to the scheduled tasks.


$from Sender email address

$to Recipient email address

 Save and close the script and you are good to go.


Feel free to give us feedback if this helps.

Prabhat Nigam

Microsoft MVP | Exchange Server


Tweet me @PrabhatNigamXHG



4 Responses to “Exchange 2013: Health Check Script”

  1. muthu Says:


    It is for 2010 also ?


  2. Prabhat Says:

    Yes, check it on Vikas Sukhija’s blog or gallery

  3. Basit Says:

    I am unable to fine the line # report path and url can u specify in which line are those i have opened in notepad++ ??

  4. Prabhat Nigam Says:

    Line number 27 and 45

Leave a Reply




Do NOT follow this link or you will be banned from the site!