PowerShell script exchange
Post Reply
StLaurie
Novice
Posts: 4
Liked: never
Joined: Sep 27, 2017 11:27 pm
Full Name: Laurie Street
Contact:

Trying to find property for job retry

Post by StLaurie »

I'm trying to find the property on a job or session (Get-VBRJob or Get-VBRBackupSession respectively) to work out whether or not a job was retried and if it then succeeded.
Is there a cmdlet or a property I can use to get the retry count. All retry properties I've found have been 0, or false.

Cheers
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Trying to find property for job retry

Post by veremin »

BackupSession has a boolean property named "IsRetryMode". It shows whether it was a retry session or not. So, what you can do is to query bunch of latest sessions for particular job for which this property is equal to $True and count them. Thanks.
StLaurie
Novice
Posts: 4
Liked: never
Joined: Sep 27, 2017 11:27 pm
Full Name: Laurie Street
Contact:

Re: Trying to find property for job retry

Post by StLaurie »

Awesome, thanks for that!
veremin
Product Manager
Posts: 20282
Liked: 2257 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Trying to find property for job retry

Post by veremin »

You're welcome. Should you encounter any problems while scripting the proposed algorithm, let me know. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests