i was wondering whether there's a easy method to get the last expected start time of a backup job. I found
(Get-BEJob | select -First 1).Schedule
But with these information the last expected (!) start time has to be hardly calculated manually.
I am looking for a easy parseable variable which can be used to determine wheter a job has successfully started at the last start time.
Thanks in advance.
BEJob has a "NextStartDate" property -- it's a DateTime object, not a string -- so no parsing necessary.
We added formatting to many object types in BEMCLI so they look better in the console by default -- but this also hides many useful properties. To see all of them, use "Format-List * -Force" like so:
Get-BEJob | Select -first 1 | Format-List * -Force
That will show you every possible property of a BEJob.
Hope that helps you out!
No, there isn't a property for the last expected start time. However, as pkh suggested, you may be able to get what you're looking for by examining the most recent job history related to the job you're trying to learn that info from:
$history = Get-BEJob "Job Name" | Get-BEJobHistory | Select -First 1
Here, the $history variable would have the latest job history object. Perhaps its StartTime would help?