I would like to measure multiple times in an automation PowerShell script. I used Get-Date and TotalSeconds. The result looks for example like this: 236.908
How can I get the elapsed time as human readable in minutes and seconds?
$startTime = (Get-Date)
$endTime = (Get-Date)
$ElapsedTime = (($endTime-$startTime).TotalSeconds)
Write-Host "Duration: xx min xx sec"