Is there a simple way to calculate how long your report takes to run and display it in hours, minutes and seconds?
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()
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The New-Timespan cmdlet can hep you with that.
See for example Powershell show elapsed time
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I use simple measure-command.
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()
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OK great thanks