Special thanks to our dear Veeam Support Team Members Cosmin Ciobanu and Marius Nita for the following trick! Veeam Support is _always_ looking for ways to make everyone’s lives easier.
Currently, to generate an HTML report for many sessions at once you need to go to the Session tab in the UI and ctrl / shift + click on desired sessions; not always convenient, and for Transaction Log backup sessions in particular you may have hundreds (if not thousands) of sessions.
With Powershell and a bit of prep work, you can do this automagically:
Preparatory Step:
From a Windows-based backup server, copy the following files
Copy
C:\Program Files\Veeam\Backup and Replication\Backup\SessionReport.xslt
C:\Program Files\Veeam\Backup and Replication\Backup\SqlSessionReport.xslt
to the following path on the machine where you will generate the report with Powershell:
Windows:
C:\Program Files\PowerShell\7\
Linux:
/opt/microsoft/powershell/7/
Both xslt files should be in the powershell/7 directory.
Then run the following script; this example uses a Veeam Agent for Windows job with Transaction Log backups enabled:
$job = Get-VBRJob -name "name of job with Tlog backups enabled" #We use Get-VBRJob even for Agents despite this being deprecated. Add -WarningAction SilentlyContinue to suppress warning
$sqlJob = $job.FindChildJobs().FindChildSqlLogBackupJob()
$sessions = [Veeam.Backup.Core.CBaseSession]::GetSessionsForJob($sqlJob.id)
$bSessions = @()
ForEach($x in $sessions){
$bSessions+=[Veeam.Backup.Core.CBackupSession]::Find($x.id)
}
$reportFactory = [Veeam.Backup.Core.CReportGeneratorFactory]::Create($bSessions, $true, $false)
$report = [Veeam.Backup.Common.SReportContentGenerator]::GenerateReport($reportFactory)
$report | Out-File C:\temp\report.htmlScreenshot of example report:

Naturally, all of this is unsupported, but for those who are daring, you now have the power in your shell.

