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
Written by Matt Talley
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Powershell
Authors
Related Tags
#powershell
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#