If I understand the question correctly the goal is to show some additional
information in the progress messages. This can be done for example by using the
Activity
parameter. The script below only shows the idea (for 1 minute, for a
shorter test). It should be modified in order to reflect actually needed format
of the message and information to be shown.
$time = 60 # seconds, use you actual time in here
foreach($i in (1..$time)) {
$percentage = $i / $time
$remaining = New-TimeSpan -Seconds ($time - $i)
$message = "{0:p0} complete, remaining time {1}" -f $percentage, $remaining
Write-Progress -Activity $message -PercentComplete ($percentage * 100)
Start-Sleep 1
}
The progress looks like this:
57 % complete, remaining time 00:00:26
Processing
[oooooooooooooooooooooooooooooooooooooooooooooooooooooo
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…