This post is a part of the Powershell monitoring tool called Poshland Monitoring. You can download it from the Poshland Resources website.
In the last post, I show you how to create your own Monitor Pack in
To send an email with the health report from Poshland Monitoring
Poshland Monitoring tool is using SMTP RELAY to sending emails. Before you specify your email settings in the GLOBAL_PARAM.ini file, you have to add your IP address to SMTP relay settings.
Firstly, you have to specify three values.
- SmtpServer – FQDN of email server
- From – sender email address of health reports
- SendTo – Recipient email address of health reports
The second step is choosing email reports mode. If you would like to receive health reports only when something goes wrong (at least one health check function will return FAIL), you can set AlertsOnly parameter to true.
If you set AlertsOnly parameter to false, always you will be receiving email reports.
Set your Monitor Pack to send email
It’s almost done. In the last step, you can choose from which Monitor Pack you will receive the report on your mail. You can do this by editing the param.ini in the Monitor Pack directory. In this file, you can also specify the email message subject.
Generate health report
Now you can run the main PowershellMonitoring.ps1 script and send your first health email report from the Poshland Monitoring tool.
Check email report
Finally, you can check the generated health report in your inbox.
To sum up, you can set up your email settings globally in the Poshland Monitoring tool and choose separately, which Monitor Pack should send you email reports.