Hi
@petersonal,
This gets a bit tricky; first, just a reminder that the .NET methods like GetScheduleOptions() are not supported, and part of the reason is for issues like this. In the past we actually raised an issue on this with our RND and they kindly told us the truth that the job time statuses changed the location they store their info in v10 (for oleg and other PMs checking, issue 214048). GetScheduleOptions() and LatestRunLocal in particular pulls from the old location which is only updated if you edit the job and click "Finish", so it's kind of not reliable.
Basically if I remember right, it's just not proper to rely on this value anymore; likely if you edit the job in the UI (don't change anything, just click "Finish") you'll see this value updated.
As a workaround, could you accept using the last session data?
Supported Way (Longer):
Code: Select all
$job = Get-VBRJob -name 'some job'
$Sess = Get-VBRBackupSession -Name $job.name | sort -Property CreationTime -Descending | select -First 1
$Sess.CreationTime #This will be the same value LatestRunLocal used to present
UnSupported way (Faster, probably safe for future but no guarantees)
Code: Select all
$job = Get-VBRJob -name 'some job'
$sess = $job.FindLastSession()
$sess.CreationTime