cancel
Showing results for 
Search instead for 
Did you mean: 

ROCm Discussions

hkrtrainings
Journeyman III

Veeam Powershell "Storage-Level Corruption Guard" File Backup Maintenance

Good day to you all, i hope you are well.

I am creating a number of backup copy jobs for Hyperv machines in Veeam using powershell. I need to turn on target-->advanced--> Storage-level corruption Guard "Preform backup files health check" and set it to monthly - Last Saturday

and also Set

Remove deleted items data after "30 Days"

Defragment and compact full backup file to "Monthly -> Last Sunday"

I have written this based on something on the veeam forums, there are no errors but it also appears to do nothing:

  $retention = Import-csv C:\script\test.csv
    $days=@("Saturday")
    $weeks=@("Last")

    Foreach ($i in $retention)


        {




        Set-VBRJobAdvancedOptions -Job $i.'BC-Name' -EnableIntegrityChecks $True

         $job = Get-VBRJob -name $i.'BC-Name'
         $Options=$job.getoptions()
        $Options.GenerationPolicy.RecheckScheduleKind = "Monthly"
         write-host $job.Name $days $weeks

         $Options=$job.getoptions()
        $Options.GenerationPolicy.RecheckScheduleKind = "Monthly"
         $Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayOfWeek = $days
        $Options.GenerationPolicy.RecheckBackupMonthlyScheduleOptions.DayNumberInMonth = $weeks
        $Options.GenerationPolicy.EnableRechek = $true
        $job.SetOptions($Options) | out-null
        }
0 Likes
0 Replies