By Ivy / Last update October 29, 2021

Windows Server Backup Does Not Support Email Notification

Windows Server Backup (WSB) is replacing NTBackup in Windows Server 2008, 2012, 2016, 2019 to backup and restore files, operating system, and other data, etc. Its WBAdmin command cloud help you to create system state backup, full backup, and more. 

However, Windows Server Backup does not offer you the function to get email notification. If it’s important for you to get email notification, you may turn to other backup tools for help. Don't worry, this article will show you two ways to configure email alerts for you.

Create Powershell Script Files to Enable Email Alert [Verified]

Generally, Windows Server Backup is not installed by default in Windows Server 2012 or other systems. You have to install it in Server Manager, select Manage -> Add Roles and Features, and add Windows Server Backup to install. Then, create a scheduled backup job using WSB. Then follow me to create two scripts.

Create Powershell Scripts File

Here are the sample scripts for backup success email task and backup failure email task. You could replace the below red for you own ones, and please name the following two scripts in order: email-success.ps1, email-failure.ps1. Then copy them to C:\Windows\System32 folder.

#Send Backup Success Email

$secpasswd = ConvertTo-SecureString "YOUREMAILPASSWORD" -AsPlainText -Force

$mycreds = New-Object System.Management.Automation.PSCredential ("[email protected]", $secpasswd) 

Send-MailMessage -To "[email protected]", "[email protected]" -Subject "Success Windows Server backup" -Body "YOUR COMPANY Windows Server Backup is successful" -SmtpServer "YOUR.SMTP.SERVER" -Credential $mycreds -Port "587" -UseSsl -from "[email protected]"


#Send Backup Failure Email

$secpasswd = ConvertTo-SecureString "YOUREMAILPASSWORD" -AsPlainText -Force

$mycreds = New-Object System.Management.Automation.PSCredential ("[email protected]", $secpasswd) 

Send-MailMessage -To "[email protected]", "[email protected]" -Subject "Failure Windows Server backup" -Body "YOUR COMPANY Windows Server backup failed" -SmtpServer "YOUR.SMTP.SERVER" -Credential $mycreds -Port "587" -UseSsl -from "[email protected]"

✥ Notes:
✿ The Port could be 465, or 587, it depends on your email SMTP server settings.
✿ The YOUREMAILPASSWORD could be an authorization code.
✿ Parameters after Send-MailMessage cannot be executed on a new line.
✿ After creating your PowerShell script file, you could right click the script file and choose edit, then go to Windows Powershell ISE to verify the correctness of the script file, you will receive the email notification if that’s right.
✿ If you get this error: cannot be loaded because the execution of scripts is disabled on this system. You could run the command  Set-ExecutionPolicy RemoteSigned in Windows Powershell first to allow execution of .ps1 file.

Create Task for Backup Success/Failure Email Notification

Run Task Scheduler in Server Manager’s Tool Menu to create backup success/failure email alerts, here are the steps:

Create Backup Success Email Notification

1. Choose Create Task to open the interface.

2. In General tab, specify a Name (e.g. Backup Success Email Task) and Description (e.g. Notification of Scheduled Backup Successful), and tick Run whether user is logged on or not.

Create Email Notification Success Task General Settings

3. In Triggers tab, Select New… -> choose On an Event in Begin the task box -> check Basic for settings (Select Microsoft-Windows-Backup/Operational for Log, Enter 4 for Event ID) -> check Stop task if it runs longer than: 1 hour, as well as Enable -> Click OK.

Create Email Notification Success Task Triggers Settings

4. In Actions tab, click New… -> Select Start a program in Action box -> enter powershell.exe in Program/script box -> input -EP Bypass c:\Windows\System32\email-success.ps1 in Add arguments (optional) box -> Press OK.

Create Email Notification Success Task Actions Settings

5. In Settings tab, Check Stop the task if it runs longer than: and set it to 1 hour -> Click OK and on credentials prompt enter the credentials required for running the task.

Create Email Notification Success Task Settings

Create Backup Failure Email Notification

The steps to create backup failure email notification is similar to the above steps, just follow the step 1-5 to create, the only differences listed below:

1. In General tab, specify another different Name and Description.

Create Email Notification Failure Task General Settings

2. In Triggers tab, create individual triggers for Events 5, 8, 9, 17, 18, 19, 20, 21, 22, 49, 50, and 561.

Create Email Notification Failure Task Triggers Settings

3. In Actions tab, type in -EP Bypass c:\Windows\System32\email-failure.ps1 instead in Add arguments box.

Create Email Notification Failure Task Action Settings

Now, wait for the scheduled task running at the scheduled time. If you set correctly, after the backup finished or failed, you will receive the email immediately.

However, this way is quite complex for ordinary people, is there any easier way to configure email notification for Windows Server Backup in 2012 (R2) and other servers systems?

Easier Way to Configure Email Notification for Windows Server 2012 (R2)

You have another flexible and easiest way to enable email notification, that is the Windows Server backup software, AOMEI Backupper Server.

  • It is available for Windows Server 2003, 2008, 2011, 2012, 2016, 2019, 2022 (including R2), SBS 2003, 2008, 2011 and Windows PCs.
  • It enables you to create system backup, disk backup, partition backup, and file backup. You can also synchronize files between Windows Servers as per your need.
  • It is capable of enabling email notification to notice you the status of the backup or sync task if required.

Before configuring email notification, you could download AOMEI Backupper Server 30-day free trial first. (Clone features in the free trial can be demonstrated only, please upgrade to enjoy)

Download Free Trial Windows PCs & Servers
Secure Download

Here we will take disk backup for example to configure email alerts in Windows Server 2012 (R2), shown as below:

1. Running AOMEI Backupper Server after installing, choose Backup -> Disk Backup in turn. 

Disk Backup

2. Click Add Disk button and select the hard drive you are going to backup. 

Add Disk

3. Select a destination for your disk backup image file. 

Select Backup Destination

4. Click Options at the bottom left corner, and turn on Email notification in General tab, then click OK

Enable Email Notification for Disk Backup

✥ Tip: If you didn’t configure email server before, please choose the icon next to the minimize button of the main window, and select Settings, turn on the Enable email or SMS notification in Notifications tab. Choose a server fit for you, and click OK to save the settings. 

Enable Email or SMS Notification for Disk Backup

5. Click Start Backup>> to create disk backup in Windows Server 2012 (R2) with email notification.

Start Backup

Now, just wait for backup task finished. Once completed, you will save email notification or SMS alert to tell you the result of the backup.

The Epilogue

Configuring email notification for backup/sync task in Windows Server 2012 (R2) is just a piece of cake for AOMEI Backupper. Besides, it allows you to real time sync files to other locations, create scheduled backup in particular time, restore to dissimilar hardware computer, etc. If you’re the technician of the IT company, AOMEI Backupper Technician or Technician Plus edition will satisfy you with more advanced features.