![]() ![]() $cred=New-Object -TypeName -ArgumentList $User, (Get-Content $File | ConvertTo-SecureString) The file “C:\EmailPassword.txt” will be loaded in the 2 nd line in the script below. "myPassword" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | Out-File "C:\EmailPassword.txt" In my example, the password “MyPassword” will be encrypted and saved to file EmailPassword.txt at C:\. Adding credentials in plain text is not something we want to do, so we´ll first encrypt it by using the PowerShell command below. In order to send an email, we need to authenticate to our SMTP server by adding a username and password. This is a simple script already tested and published on TechNet. This article is not focused on the pros and cons of using Windows Server Backup, but it is specific to email notification. I vote for removing it, as it is useless and it looks confusing.Ĭonsidering that you have already installed and configured your Windows Server Backup and that you have backup jobs in place, we can directly jump into Task Scheduler and proceed with the configuration. If you have ever worked with Task Scheduler, you have probably noticed that the feature for sending an email is still there, but it´s deprecated and it doesn´t work. ID 4 for successful backup, ID 49 for failed backup). This can be done by executing a PowerShell script that will send an email on a specific event ID (e.g. By combining Windows Server Backup and Task Scheduler we can overcome this challenge and get notified if backup jobs succeed or fail. Windows Server Backup doesn’t natively support SMTP notifications and this title might sound a bit confusing. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |