Replace deprecated Send-MailMessage with Send-MailKitMessage (#107)

The Send-MailMessage cmdlet is obsolete. It doesn't guarantee secure connections to SMTP servers.

Use Send-MailKitMessage module instead.

Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Co-authored-by: Kevin Woley <kmwoley@users.noreply.github.com>
This commit is contained in:
innovara
2025-01-25 05:50:08 +00:00
committed by GitHub
parent b81aa242bc
commit c4a497e0d1
4 changed files with 9 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ Simplifies the process of installation and running daily backups.
1. Email sending configuration is also contained with this file. The scripts assume you want to get emails about the success/failure of each backup attempt.
1. Run `install.ps1` file
1. From the elevated (Run as Administrator) Powershell window, run `.\install.ps1`
1. This will initialize the repo, create your logfile directory, and create a scheduled task in Windows Task Scheduler to run the task daily.
1. This will initialize the repo, create your logfile directory, create a scheduled task in Windows Task Scheduler to run the task daily, and install Send-MailKitMessage module.
1. Add your `$BackupSources` to `config.ps1`
1. By default, all of `C:\` will be backed up. You can add multiple root drives to be backed up. And you can define only specific folders you would like backed up.
1. External, removable disk drives (i.e. USB hard drives) can be identified by their Volume Label, Serial Number, or Device Name. For example, if you have an external device with the Volume Label "MY BOOK", you can define a backup source as `$BackupSources["MY BOOK"]=@()`. I would recommend using the device serial number to identify external drives to backup, which you can find using the Powershell `get-disk` command. You may also want to set `$IgnoreMissingBackupSources=$true` to avoid seeing errors when the removable drive is not present.