Created
April 27, 2015 09:38
-
-
Save macna/ac7e8c356927b10e085d to your computer and use it in GitHub Desktop.
PowerShell scripts for sending Windows Server Backup success/failure notifications. Using these scripts, you can create Windows scheduled tasks that are triggered on the event IDs of Windows Server Backup. For success notifications the task should be triggered on event ID '4'. For failure notifications the task should be triggered on event IDs '…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hostname = hostname | |
Send-MailMessage -To [email protected] -From "[email protected]" -Priority High -SmtpServer smtp.contoso.com -Subject "$hostname - Backup Failure" -Body "A backup on $hostname has failed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$hostname = hostname | |
Send-MailMessage -To [email protected] -From "[email protected]" -Priority Low -SmtpServer smtp.contoso.com -Subject "$hostname - Backup Success" -Body "A backup on $hostname has succeeded." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment