Send a daily html CCR report via Powershell

Create a powershell script to generate the html file

Test-ReplicationHealth | ConvertTo-Html -title “BackupReport CCR” -body “Backup status per Storage Group” | Set-Content E:StorageGroupBackupStatus.html



Create a powershell script to e-mail log file

$filename = “E:StorageGroupBackupStatus.html”
$smtpServer = “RelayServer”
$msg = new-object Net.Mail.MailMessage
$att = new-object Net.Mail.Attachment($filename)
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = “
$msg.Subject = “CCR Status”
$msg.Body = “Attached is the CCR status”

Go into task scheduler

For the program type this
For the arguments use
-PSConsoleFile “C:Program FilesMicrosoftExchange Serverbinexshell.psc1” -noexit -command “. ‘e:SendLogFile.ps1′”

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply