Files
tacticalrmm/scripts_wip/Win_Veeam_Backup_Script_Notification2.ps1
2021-11-06 15:23:16 -04:00

18 lines
489 B
PowerShell

# Untested probably doesn't work
$event = Get-EventLog "Veeam Backup" -newest 1 -After (Get-Date).AddDays(-1) | Where-Object { $_.EventID -eq 0 }
if ($event.entrytype -eq "Error") {
write-host "We got an event that is an error from Veeam Backup!"
Rmm-Alert -Category "veeam_backup_failed" -Body "Veeam Backup Failed on $(%computername%) - message: $($event.message)"
}
else {
write-host "No errors here"
}
else {
Write-Output "Veeam not Installed
exit 0"
}
Exit $LASTEXITCODE