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
-
- Novice
- Posts: 5
- Liked: 2 times
- Joined: Feb 05, 2015 10:53 am
- Full Name: Dieter Bocklandt
- Contact:
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Cant get schedule of backup that runs after another back
Hi,
I think that this is what you need:
Using the output of the last command you can get the previous job's properties.
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
-
- Novice
- Posts: 5
- Liked: 2 times
- Joined: Feb 05, 2015 10:53 am
- Full Name: Dieter Bocklandt
- Contact:
Re: Cant get schedule of backup that runs after another back
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
When I finally finish the script, I'll share it with the rest of the community.
Thanks,
Dieter
Who is online
Users browsing this forum: No registered users and 12 guests