This allows you to use the Windows Task Scheduler to send an email via PowerShell script when a Windows Backup succeeds or fails.
- Put the two PowerShell scripts in a secure folder that only the administrator can access. They will have credentials to send email in them.
- Update the placeholders in each script to allow email to send. Run the scripts to ensure the email goes out.
- Create a scheduled task that is triggered on an event from the event log. Set up a custom filter and use the
backup-failed-filter.xml
as the filter. This catches all the backup failure events and will trigger the script. Attach that to theSend-BackupFail.ps1
. - Create a scheduled task that is triggered on an event from the event log. Attach
Send-BackupSuccess.ps1
to that.- Log: Microsoft-Windows-Backup/Operational
- Source: Backup
- Event ID: 4