I would like to edit bakup copy job's schedule via powershell.
I made a script as follows with reference to other forums.
Code: Select all
asnp VeeamPSSnapin $job = Get-VBRJob -Name "AD" $ScheduleOptions = Get-VBRJobScheduleOptions -Job $job $ScheduleOptions.OptionsBackupWindow.IsEnabled = $false $options = New-VBRBackupWindowOptions -FromDay Saturday -FromHour 0 -ToDay Sunday -ToHour 23 -Enabled:$true $options = Set-VBRBackupWindowOptions -Options $options -PassThru -FromDay Sunday -FromHour 0 -ToDay Sunday -ToHour 3 -Enabled:$false $options = Set-VBRBackupWindowOptions -Options $options -PassThru -FromDay Saturday -FromHour 4 -ToDay Saturday -ToHour 23 -Enabled:$false $schedule.OptionsBackupWindow = $options Set-VBRJobScheduleOptions -Job $job -Options $schedule
However, when I checked Edit> Schedule on the Veeam console, it seems that the setting has not been changed.
Please advise if there are known information such as insufficient script syntax or editing of backup copy job can not be confirmed from the GUI.
Thank you for reading.