Change interval time of backup copy job via powershell

PowerShell script exchange

Change interval time of backup copy job via powershell

Veeam Logoby dbr » Wed May 10, 2017 6:46 am

Hi all,

I would like to script creation of our backup and backup copy jobs cause of job redesign. I'm struggeling with changing the default interval time from 00:00 to 18:00 in a backup copy job. It's easy for a backup job: Set-VBRJobSchedule -Job <backupjobname> -daily -at 18:00. But I couldn't find a suiteable cmdlet or any other way to set the interval time of a copy job. Set-VBRJobSchedule doesn't seem to work with backup copy jobs.

Error:

Code: Select all
Set-VBRJobSchedule : Specify a backup job
At line:1 char:1
+ Set-VBRJobSchedule -Job se-bc-62 -daily -at 18:00
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VBRJobSchedule], Exception
    + FullyQualifiedErrorId : System.Exception,Veeam.Backup.PowerShell.Cmdlets.SetVBRJobSchedule


Does anyone know how to change interval time through powershell?

Daniel
dbr
Enthusiast
 
Posts: 28
Liked: never
Joined: Thu Apr 06, 2017 9:48 am
Full Name: Daniel Brase

Re: Change interval time of backup copy job via powershell

Veeam Logoby dbr » Wed May 10, 2017 12:49 pm

I figured out the solution by myself:

Code: Select all
$timespan = new-timespan -hours 18
$joboptions = get-vbrjoboptions -job se-bc-62
$joboptions.GenerationPolicy.SyncIntervalStartTime = $timespan
set-vbrjoboptions -job se-bc-62 -options $joboptions


Thanks.
dbr
Enthusiast
 
Posts: 28
Liked: never
Joined: Thu Apr 06, 2017 9:48 am
Full Name: Daniel Brase


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests