PowerShell script exchange
Post Reply
pouya
Influencer
Posts: 14
Liked: 1 time
Joined: Jun 18, 2018 12:00 am
Full Name: Phillip Ou Yang
Location: Sydney, Australia
Contact:

How to mass enable retry on failure across all jobs?

Post by pouya »

Hi powershell friends,

We currently have an environment where everything was scripted when deployed. Unfortunately we didnt set the retry count in the script so I am going about trying to set it now in a separate powershell command-

I tried setting it like this however it seems that EnableRetry is only a valid variable for agent jobs and not backups for our ADLS objects. Wondering if anyone can help out with this?

> foreach ($job in $alljobs) {
>> $job.ScheduleOptions.RetryTimes = "3"
>> $job.ScheduleOptions.EnableRetry = "true"
>> $job.update()}
david.domask
Veeam Software
Posts: 3072
Liked: 710 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: How to mass enable retry on failure across all jobs?

Post by david.domask »

Hi Phillip,

What job types?

For VMware/HyperV jobs, you want ScheduleOptions.RetrySpecified to control whether retries are enabled, and looks like we don't have a supported means of doing this so your script method will work with the RetrySpecified property.

For Agent server jobs, Set-VBRServerScheduleOptions has a switch for -EnableRetry, so please use that (set the parameter to enable, set with -EnableRetry:$false to disable)
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests