Configure Email Notification for Windows Server 2012 (R2) Backup (2 Ways)


Table of Contents
  1. Windows Server Backup Does Not Support Email Notification
  2. Create Powershell Script Files to Enable Email Alert in Server 2012 [Verified]
    1. Create Powershell Scripts File
    2. Create Task for Backup Success or Failure Email Notification
  3. Easier Way to Configure Windows Server Backup Email Notification
  4. The Epilogue

Windows Server Backup Does Not Support Email Notification

Windows Server Backup (WSB) is replacing NTBackup in Windows Server 2008, 2012, 2016, 2019, 2022 to backup and restore files, operating system, and other data, etc. Its Wbaddmin command could 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 a Windows backup email notification, you may turn to other backup tools for help. Don't worry, this article will show you two effective ways to configure email alerts for you.

Create Powershell Script Files to Enable Email Alert in Server 2012 [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.

Add Feature

Create Powershell Scripts File

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

#Send Backup Success Email

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

$mycreds = New-Object System.Management.Automation.PSCredential ("support@idiskhome.com", $secpasswd)

Send-MailMessage -To "support@idiskhome.com", "support@idiskhome.com" -Subject "Success Windows Server backup" -Body "YOUR COMPANY Windows Server Backup is successful" -SmtpServer "YOUR.SMTP.SERVER" -Credential $mycreds -Port "587" -UseSsl -from "support@idiskhome.com"

#Send Backup Failure Email

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

$mycreds = New-Object System.Management.Automation.PSCredential ("support@idiskhome.com", $secpasswd)

Send-MailMessage -To "support@idiskhome.com", "support@idiskhome.com" -Subject "Failure Windows Server backup" -Body "YOUR COMPANY Windows Server backup failed" -SmtpServer "YOUR.SMTP.SERVER" -Credential $mycreds -Port "587" -UseSsl -from "support@idiskhome.com"

✥ 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 or Failure Email Notification

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

Create Backup Success Email Notification

1. Choose Create Task to open the interface.

2. In the 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 the 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 are similar to the above steps. Just follow the step 1-5 to create, the only differences are 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 to run at the scheduled time. If you set it correctly, after the backup is 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 server systems? The answer is yes, and I'll introduce the step-by-step guide in the next part.

Easier Way to Configure Windows Server Backup Email Notification

Except for creating Powershell Script files, you still can use Windows Server backup software - Qiling Disk Master Server to configure email notifications easily in simple steps.

It is available for Windows Server 2003, 2008, 2011, 2012, 2016, 2019, 2022 (including R2), SBS 2003, 2008, 2011 and all Windows PCs.
It is capable of enabling email notification to notify you of the status of the backup or sync task if required.
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 able to set schedule settings, such as, daily, weekly, monthly, etc. For backup task, you still can reduce disk space with different features, such as, compression, spliting, incremental backup or differential backup, automatic backup cleanup, etc.

Before configuring email notification, you could download Qiling Disk Master Server first. To perform this task in unlimited PCs or servers, try the technician or techplus edition of Qiling Disk Master. And you even don't need to install it again as long as you create a portable version of it.

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

1. Running Qiling Disk Master Server after installing, choose Backup -> Disk Backup in turn.

Disk Backup

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

Disks

3. Select a destination for your disk backup image file. You can image Windows Server 2012 to new hard drive (HDD or SSD), USB drive, network drive, NAS, eyc.

Select Backup Destination

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

Enable Email Notification for Disk Backup

5. To configure your mailbox or mail server, click Settings > Notifications and slide on the Enable email or SMS notification button. Select one of them, type your email address or phone number and send for test after configuration.

Enable Email or SMS Notification for Disk Backup

Notes:
You can select when to send email notification (success, fail, user interaction required) and mail form (HTML or TXT) in the Notification settings.
After configuration, every time you create a backup or sync task, you only need to turn on the notification switch and it will notify you through your mail or phone.

6. Click Proceed>> to create disk backup in Windows Server 2012 (R2) with email notification.

Proceed

There are other helpful features you can use:
Schedule Backup: It allows you to set automatic backup with different frequencies, from hourly to monthly. And you still can use Event trigger or USB plug in (to automatically copy files to USB drive when connected).
Backup Scheme: It is able to set different backup methods (full, incremental or differential backup) to backup only changed files, and cleanup methods (By quantity, By time, By daily/weekly/monthly) to delete old backups automatically.

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

The Epilogue

Configuring email notifications for Windows Server 2012 (R2) is just a piece of cake for Qiling Disk Master. And you just need to enable it in the Options and set your email address or phone number in Settings.

Besides, it allows you to create system backup, partition backup, file backup, and different sync methods (eg: real time sync files) with notification. If you set the mailbox or mail server previously, it will notify you as long as you turn on the notification switch.

Related Articles


Is this information helpful?     

What can we do to improve this information? (Optional)
Refresh Please enter the verification code!