• This repository has been archived on 20/Apr/2020
  • Stars
    star
    112
  • Rank 302,570 (Top 7 %)
  • Language
    PowerShell
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PowerShell script to generate a report of the health of an Exchange Server 2010/2013 environment.

Test-ExchangeServerHealth.ps1

PowerShell script to generate a report of the health of an Exchange Server 2010/2013 environment.

Performs a series of health checks on Exchange servers and DAGs and outputs the results to screen, and optionally to log file, HTML report, and HTML email.

Please note: This script has slowly degraded over time as new versions and builds of Exchange have been released. This script is no longer being maintained for bugs, however you are free to fork the project to apply your own bug fixes and improvements to suit your needs.

Usage

Create an ignorelist.txt file in the same folder as the script to specify any servers, DAGs, or databases you want the script to ignore (eg test/dev servers).

Modify the SMTP settings in the script to send emails to your own address:

#...................................
# Modify these Email Settings
#...................................

$smtpsettings = @{
	To =  "[email protected]"
	From = "[email protected]"
	Subject = "$reportemailsubject - $now"
	SmtpServer = "smtp.exchangeserverpro.net"
	}

When running the script on non-English servers you can modify the following variables in the script to match your language so that the script does not give errors or incorrect results.

#...................................
# Modify these language 
# localization strings.
#...................................

# The server roles must match the role names you see when you run Test-ServiceHealth.
$casrole = "Client Access Server Role"
$htrole = "Hub Transport Server Role"
$mbrole = "Mailbox Server Role"
$umrole = "Unified Messaging Server Role"

# This should match the word for "Success", or the result of a successful Test-MAPIConnectivity test
$success = "Success"

For example, a German system would use the following values:

# The server roles must match the role names you see when you run Test-ServiceHealth.
$casrole = "Clientzugriffs-Serverrolle"
$htrole = "Hub-Transport-Serverrolle"
$mbrole = "Postfachserverrolle"
$umrole = "Unified Messaging-Serverrolle"

# This should match the word for "Success", or the result of a successful Test-MAPIConnectivity test
$success = "Erfolgreich"

Parameters

  • -Server, Perform a health check of a single server
  • -ReportMode, Set to $true to generate a HTML report. A default file name is used if none is specified.
  • -ReportFile, Allows you to specify a different HTML report file name than the default.
  • -SendEmail, Sends the HTML report via email using the SMTP configuration within the script.
  • -AlertsOnly, Only sends the email report if at least one error or warning was detected.
  • -Log, Writes a log file to help with troubleshooting.

Examples

.\Test-ExchangeServerHealth.ps1

Checks all servers in the organization and outputs the results to the shell window.

.\Test-ExchangeServerHealth.ps1 -Server HO-EX2010-MB1

Checks the server HO-EX2010-MB1 and outputs the results to the shell window.

.\Test-ExchangeServerHealth.ps1 -ReportMode -SendEmail

Checks all servers in the organization, outputs the results to the shell window, a HTML report, and emails the HTML report to the address configured in the script.

More Information

http://exchangeserverpro.com/powershell-script-exchange-server-health-check-report

Credits

Written by: Paul Cunningham

Find me on:

Check out my books and courses to learn more about Office 365 and Exchange Server.

Additional Credits (code contributions and testing):

  • Chris Brown
  • Ingmar BrΓΌckner
  • John A. Eppright
  • Jonas Borelius
  • Thomas Helmdach
  • Bruce McKay
  • Tony Holdgate
  • Ryan
  • @andrewcr7

More Repositories

1

Powershell-Exchange

PowerShell Scripts for Microsoft Exchange Server
PowerShell
143
star
2

Collect-ServerInfo

PowerShell script to collect information about Windows servers
PowerShell
68
star
3

Get-MailboxReport.ps1

PowerShell script to generate a report of mailboxes, including information such as item count, total size, and other useful attributes.
PowerShell
67
star
4

PowerShell-Stored-Credentials

PowerShell functions to manage stored credentials on your admin computers
PowerShell
49
star
5

ConfigureExchangeURLs.ps1

PowerShell script to configure Client Access server URLs for Microsoft Exchange Server
PowerShell
49
star
6

IISLogsCleanup

PowerShell script to cleanup old IIS log files
PowerShell
32
star
7

New-LabUsers.ps1

PowerShell script to generate user accounts in Active Directory for a test lab environment
PowerShell
27
star
8

Get-MailboxAuditLoggingReport.ps1

Generate an Exchange Server mailbox audit logging report
PowerShell
26
star
9

Get-EASDeviceReport.ps1

This PowerShell script produces a simple report of the ActiveSync device associates in an Exchange organization.
PowerShell
24
star
10

ExchangeServerAntivirusExclusions

PowerShell Scripts to Generate Antivirus Exclusions for Exchange Servers
PowerShell
22
star
11

Office-365-Scripts

PowerShell Scripts and Code Samples for Office 365
PowerShell
19
star
12

Add-SMTPAddresses.ps1

PowerShell script to perform bulk adding of new SMTP addresses to Office 365 mailboxes
PowerShell
18
star
13

Get-IPGeolocation.ps1

PowerShell script to perform a REST API query to get IP address geo-location information
PowerShell
17
star
14

Office365GroupsReport

PowerShell script to generate a report about new, modified, and deleted Office 365 Groups
PowerShell
16
star
15

Get-DAGHealth.ps1

Exchange Server 2010/2013 Database Availability Group health check script
PowerShell
14
star
16

Get-DailyBackupAlerts.ps1

Generate an email report of Exchange database backup times
PowerShell
13
star
17

Start-MailGen.ps1

PowerShell script to generate email traffic in a test lab environment using Exchange Web Services
PowerShell
11
star
18

Get-CASHealth.ps1

PowerShell script to test Client Access server health
PowerShell
11
star
19

Get-RBACGroupMemberReport.ps1

PowerShell script to report the membership of Exchange RBAC role groups
PowerShell
10
star
20

Office-365-Deploy

Office 365 Client Deployment Scripts
PowerShell
9
star
21

Install-MicrosoftTeams

PowerShell Script for Microsoft Teams Client Deployment
PowerShell
7
star
22

Office365AdminGroupsReport

A PowerShell script to generate a report of Office 365 admin role/group membership.
PowerShell
7
star
23

Import-MailContactsFromCSV

PowerShell script to import mail contacts from a CSV file into Exchange
PowerShell
6
star
24

Get-DagApMap.ps1

Create a map of database copy activation preferences
PowerShell
5
star
25

Get-AuditLogOverHead.ps1

PowerShell script to report on the size of the mailbox audit logs stored in mailboxes in an Exchange Server organization.
PowerShell
4
star
26

PowerShell-General

A repository of general PowerShell scripts, functions and code samples.
PowerShell
4
star
27

InstallAWSPowerShellModule

PowerShell script to download and install the MSI package for the Amazon Web Services Tools for Windows PowerShell.
PowerShell
4
star
28

Office365MessageCenterDigest

An email digest of Office 365 Message Center messages
PowerShell
3
star
29

Find-StaleDelegates.ps1

PowerShell
3
star
30

EASTroubleshooter

Exchange ActiveSync Troubleshooting Script
PowerShell
3
star
31

Find-StaleManagers.ps1

PowerShell
2
star
32

HyperVHealthReport

A PowerShell Script that Generates a Hyper-V Health Report
2
star
33

cunninghamp.github.io

Paul's Python and code tinkering blog, built with Jekyll and Github Pages
Ruby
2
star
34

Get-MessageTrackingConfig.ps1

Generate a CSV report of the message tracking configuration of your Exchange 2013 servers.
PowerShell
2
star
35

rss-feeds

1
star
36

GitWorkflowDemo

A demo repository used to write a blog post about my Git workflow
PowerShell
1
star
37

Exchange2007MBtoMEU.ps1-Customized

A customized version of Microsoft's Exchange2007MBtoMEU.ps1 for Office 365 migrations.
PowerShell
1
star