Cant get schedule of backup that runs after another backup

PowerShell script exchange

Cant get schedule of backup that runs after another backup

Veeam Logoby dieterbocklandt » Fri Oct 09, 2015 2:51 pm

Hi,

I'm working on a script that gives me all schedules of all our backup jobs. That works fine for now, only backup jobs that are scheduled to run after another job pose a problem. I cant seem to get the "parent" job out of the Powershell API. The only thing I've found is the OptionsScheduleAfterJob property, but that only contains a boolean.

Is there anyway I can get this information?

Thanks!
Dieter
dieterbocklandt
Novice
 
Posts: 5
Liked: 2 times
Joined: Thu Feb 05, 2015 10:53 am
Full Name: Dieter Bocklandt

Re: Cant get schedule of backup that runs after another back

Veeam Logoby PTide » Fri Oct 09, 2015 3:58 pm

Hi,

I think that this is what you need:

Code: Select all
PS C:\Users\PTide> $job1 = Get-VBRJob -Name "Backup Job 3"
PS C:\Users\PTide> $job1.PreviousJobIdInScheduleChain

Guid
----
76beb3a2-8574-439a-936d-aba98c6fb957


Using the output of the last command you can get the previous job's properties.
PTide
Veeam Software
 
Posts: 3019
Liked: 246 times
Joined: Tue May 19, 2015 1:46 pm

Re: Cant get schedule of backup that runs after another back

Veeam Logoby dieterbocklandt » Mon Oct 12, 2015 7:57 am 1 person likes this post

Exactly the thing I was looking for! Thanks a lot for for the fast answer!

When I finally finish the script, I'll share it with the rest of the community.

Thanks,
Dieter
dieterbocklandt
Novice
 
Posts: 5
Liked: 2 times
Joined: Thu Feb 05, 2015 10:53 am
Full Name: Dieter Bocklandt


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 6 guests