Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

Email CollectOverMetrics.ps1 HTML Report

$
0
0

Exchange 2013 SP1 with 2 member DAG with 1 DB. I want to monitor the DAG using collectovermetrics.ps1. I want to have the html report from collectovermetrics.ps1 email to administrators. I know I have to have task scheduler run the command:

CollectOverMetrics.ps1 -DatabaseAvailabilityGroup DAG1 -StartTime "06/15/2012" -EndTime "06/16/2012" -GenerateHTMLReport –ShowHTMLReport

But how do I have that report emailed? I know you can use:

Send-MailMessage -To user@user.com -From user2@user.com -subject "This is a test" -Credential (Get-Credential)

But this fails with:

send-mailmessage : The email cannot be sent because no SMTP server was specified. You must specify an SMTP s
using either the SmtpServer parameter or the $PSEmailServer variable.
At line:1 char:1+ send-mailmessage -to user@domian.tld -from user2@domain.tld+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : InvalidArgument: (:) [Send-MailMessage], InvalidOperationException+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.SendMailMessage

Can anyone help with this?


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>