- Test-ServiceHealth (this verifies that all Exchange services are running)
- Test-SystemHealth (this is essentially the command-line equivalent of the ExBPA).
- Test-ReplicationHealth (this tests replication health between nodes of a Database Availability Group or "DAG").
- Get-MailboxServer (in particular, this displays the "-databasecopyactivation" value)
- Get-Mailboxdatabase | Get-MailboxdatabaseCopyStatus (This shows the status of our mailbox databases: mounted? dismounted?, etc.).
- Get-DatabaseAvailabilityGroup -status | fl (this shows the status of the Database Availability Group).
Running the scripts
Note: in the DAG Health script, we indicate the email address in an associated .xml file. For the Exchange Server Health script, we indicate the email address in the script itself.
Note: once again, although I tested both scripts, one would most likely just use the more general Exchange Server Health script since it covers everything concerning the DAG and more.
Scheduling the execution of the scripts (Task Scheduler)
The best way to use these scripts (in my opinion), is to schedule a task that will run them and indirectly send the HTML report to whoever should receive it (the Exchange administrators, for example, or perhaps certain managers).
I attained this objective by opening Task Scheduler and creating the new task as follows...
On the "General" tab, name the task and select the options shown below (with red dot):
On the "Triggers" tab, select "New":
Configure the task to run according to the schedule you desire, for example:
Likewise, on the "Actions" tab, select "New":
And configure the action:
For "Program/script" you can enter the full path to the powershell.exe executable file, but I discovered that this is not necessary (yes, the scripts are designed to run using PowerShell - we do not need to invoke the Exchange Management Shell or "EMS"). As for the arguments (that in my configuration designate the location of the script itself), I used the following terms:
Other combinations may function just as well, In my case, my test user received the HTML report in is mailbox as expected.