How To Generate Health Report For Exchange Server 2010/2013



You may find this Powershell script useful for daily checks of the Exchange Server 2010/2013 environment. Credit to Paul Cunningham over at ExchangeServerPro.com for this great tool.

1. Download the powershell script from here and save it onto a location where you can find it later on the exchange server. Run the Exchange Management Shell.

2. Type the following command to change the folder path to where you saved the Powershell script(Test-ExchangeServerHealth.ps1)
cd [folder path]   (eg. cd c:\support)

3. Type letter T on the keyboard than continuously press the TAB key until you see the Test-ExchangeServerHealth.ps1 and press Enter

4. You’ve will  likely run into the security error "File … cannot be loaded.  The file ... is not digitally signed.  You cannot run this script on the current system".  This means that the script is not trusted to be run on your system. Note that this error will appear for any .ps1 file you are executing that is not digitally signed.

5. To overcome this do the following (Refer to this link for complete list of cmdlet https://technet.microsoft.com/en-us/library/ee176961.aspx)
Type Set-ExecutionPolicy Unrestricted, press Enter and press Enter again to except the default.

6. Now run the Test-ExchangeServerHealth.ps1 again, press Enter, type R and press Enter.

7. Allow the Health Check to run

8. Check for errors and troubleshoot.

9. If you want a report emailed to you, update the variables in this section of the Test-ExchangeServerHealth.ps1 script.
...................................
# Modify these Email Settings
#...................................

$smtpsettings = @{
 To =  "administrator@exchangeserverpro.net"
 From = "exchangeserver@exchangeserverpro.net"
 Subject = "Exchange Server Health Report - $now"
 SmtpServer = "smtp.exchangeserverpro.net"
 }
10. Then run the script again using this command. A report will be emailed to the email address you specified above.
Test-ExchangeServerHealth.ps1 -Log -SendEmail

11. Now set the restriction back to the default setting
Type  Set-ExecutionPolicy Allsigned and press Enter twice

Hope this is informative.

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad