Here is my simple three liner script that I use to run several jobs in sequence (one after the other),
and send a single summary report by email to the administrator.
- Code: Select all
Get-VBRJob -name JOBNAME1,JOBNAME2,JOBNAME3 | Start-VBRJob | ft -AutoSize Name,State,CreationTime,EndTime,Result > LOGFILE.LOG
Send-MailMessage -To ADMIN@MY.DOMAIN -Subject Back-All-Daily -From VEEAM@MY.DOMAIN -SmtpServer MY.SMTP.SERVER -Body (Get-Content LOGFILE.LOG | out-string)
You should obviously change some values to suite your needs and preferences.
Look for those in CAPS, for example:
LOGFILE.LOG (make sure to use the same logfile name in 2nd and 3rd lines, I also recommend using full path such as C:\Batch\backup.log).