How to atomate & schedule Veeam.Backup.Validator.exe

Userlevel 6
Badge +2

Doc Veeam validator

KB2086: How to Use the Veeam Backup Validator

Veeam Backup Validator - Veeam Backup Guide for vSphere


It is essential to verify the status of the backups at the CRC level on the storage and the possibility of restoring them via Surebackup.

During the wizard for creating a backup job you can enable "Storage backup files healt check (detect and auto-heals corruption.

I prefer to automate the validation process to have a detailed report every 2 weeks

  • Copy past and save .ps1 format




    Performs a validation of all server backups



    File Name      : veeam_validator.ps1

    Author         : Me and my colleague

    Prerequisite   : PowerShell V2 , VeeamPSSnapIn installed


#------------------------------------------ VARIABLES TO CHANGE -------------------------

$email_infoTO = ""

$email_infoFrom = "$($env:COMPUTERNAME)@ "

$email_infoServer = "your SMTP"

$SmtpPort = "25"

$emailUser = "your-veeam-srv@"

$emailPass = ""

$logfolder = "c:\temp"

$cliente = "your customer name"

#------------------------------------------ END VARIABLES-------------------------------

$Jobs = Get-VBRJob |where {$_.Jobtype -like "Backup"} | sort name

$OutputFile = "$logfolder\VeeamValidation.html"

Set-Location "C:\Program Files\Veeam\Backup and Replication\Backup\"

foreach ($Job in $Jobs) {

       $startdate = $(Get-Date -uformat %m-%d-%Y_%H:%M)

    $JobName = $Job.Name


       $tempFile = "$logfolder\Validation$jobname.html"


    if ($Job.IsRunning -eq $true) {

        Write-Host $JobName "is running" |ConvertTo-Html -Fragment | Out-File $tempFile

             $dateObject = [PSCustomObject]@{

             StartDate        = $startdate

             EndDate          = $(Get-Date -uformat %m-%d-%Y_%H:%M)}

             $dateObject |ConvertTo-Html -Fragment | Out-File $tempFile -append



       #Lunch validation

    & cmd /c "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.Validator.exe" /backup:"$JobName" /format:html /report:"$tempFile"

       #write start / end time

       $dateObject = [PSCustomObject]@{

       StartDate        = $startdate

       EndDate          = $(Get-Date -uformat %m-%d-%Y_%H:%M)}

       $dateObject |ConvertTo-Html -Fragment | Out-File $tempFile -append


Set-Location $logfolder

Get-ChildItem *.html|sort | Get-Content | Set-Content $OutputFile

$html = [string]$(Get-Content $OutputFile)


# Message stuff

$MessageSubject = "Live your best life now"

$Message = New-Object System.Net.Mail.MailMessage $email_infoFrom,$email_infoTO

$Message.IsBodyHTML = $true

$Message.Subject = "[$cliente] Backup Validation"

$Message.Body = $html


# Construct the SMTP client object, credentials, and send

$Smtp = New-Object Net.Mail.SmtpClient($email_infoServer,$SmtpPort)

$Smtp.EnableSsl = $false

$Smtp.Credentials = New-Object System.Net.NetworkCredential($emailUser,$emailPass)


#send-mailmessage -SmtpServer $email_infoServer -to $email_infoTO -from $email_infoFrom -subject "[$cliente] Backup Validation" -body $html -BodyAsHtml -ErrorAction Stop

Get-ChildItem *.html |Remove-Item -Force


  • Create folder i c:\Script_Veeam
  • Open task Scheduler
  • Make sure you enter the correct path to the powershell executable Program/scipt:


  • Add arguments (optional)

-file "C:\Script_Veeam\veeam_validator.ps1"


Userlevel 6
Badge +2
  • Manual lunch from powershell ISE
  • HTML report like this :

let me know if there are any errors or typos. thanks to enjoy  :grinning:

Userlevel 7
Badge +5

Thank @Link State for sharing your script!

Do you know is there a technical difference between the validator you use in your script and the health check in job definition? I guess at least the report is more readable with your approach.

Userlevel 6
Badge +2

@vNote42 Do you mean these differences?

Veeam Backup Validator - Veeam Backup Guide for vSphere

Health Check for Backup Files - Veeam Backup Guide for vSphere