Last Updated: February 24, 2016
·
2.685K
· tallemd

Infinite progress bar

Here is the perfect progress bar. It never goes over 100%. It progresses at an even rate of speed. And it doesn't care if you don't know in advance how much work you're going to do. Unfortunately it doesn't ever finish until you tell it to. It's kind of a black box progress bar.

$j=7
for ($i=$j;$i -lt 100;$i++){Start-Sleep 1;write-progress -Activity " " -PercentComplete ((1-$j/$i)*100)}
write-progress -Activity " " -PercentComplete 100