streamline the Send-MailKitMessage installation

This commit is contained in:
Kevin Woley
2025-01-25 16:44:08 -08:00
parent 4ee0eff191
commit 296621268e

View File

@@ -60,5 +60,8 @@ else {
Write-Warning "[[Scheduler]] Backup task not scheduled: there is already a task with the name '$backup_task_name'."
}
# Install Send-MailKitMessage module
Install-Module Send-MailKitMessage -Repository PSGallery -Scope AllUsers
# Install NuGet and Send-MailKitMessage module (by force)
if ($PSVersionTable.PSVersion.Major -eq 5) {
Install-PackageProvider -Name NuGet -Force
}
Install-Module Send-MailKitMessage -Repository PSGallery -Scope AllUsers -Force