Automation

 View Only
  • 1.  Calculating report run time

    Posted Feb 12, 2014 04:02 PM

    Is there a simple way to calculate how long your report takes to run and display it in hours, minutes and seconds?



  • 2.  RE: Calculating report run time

    Posted Feb 12, 2014 04:33 PM

    The New-Timespan cmdlet can hep you with that.

    See for example Powershell show elapsed time



  • 3.  RE: Calculating report run time

    Posted Feb 12, 2014 06:28 PM

    I use simple measure-command.



  • 4.  RE: Calculating report run time
    Best Answer

    Posted Feb 12, 2014 06:49 PM

    A simple example how you can use the New-Timespan cmdlet

    $start = Get-Date

    # Your code


    $duration = New-TimeSpan -Start $start -End (Get-Date)
    $duration.Duration()


  • 5.  RE: Calculating report run time

    Posted Feb 13, 2014 10:58 PM

    OK great thanks