Task sequence duration

Maybe not as robust of a solution as you are looking for, but I have a simple script which runs immediately at the beginning of a task sequence as the first step (beginning time) and at the end of the task sequence as the last step (end time):

  1. Get beginning time (e.g. $BeginningTime = Get-Date)
  2. At end, get end time and subtract from beginning time ($Duration = $BeginningTime - $EndTime) then you can get amount of time surpassed like $Duration.TotalMinutes

I just have a .csv file which the script adds a row with other task sequence variables like the TS Name, model of computer, specs of computer, assigned user (we capture this during OSD), etc.

Here's how to read TS variables with PowerShell: https://docs.microsoft.com/en-us/sccm/osd/understand/using-task-sequence-variables

/r/SCCM Thread