Created
November 20, 2019 13:49
-
-
Save michaelvdnest/dabb80b00d65f09beca1cfc769dd52c3 to your computer and use it in GitHub Desktop.
An example of multiple progress bars in Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For ($i=0; $i -le 10; $i++) { | |
Start-Sleep -Milliseconds 1 | |
Write-Progress -Id 1 -Activity "First Write Progress" -Status "Current Count: $i" -PercentComplete (($i/10)*100) -CurrentOperation "Counting ..." | |
For ($j=0; $j -le 10; $j++) { | |
Start-Sleep -Milliseconds 1 | |
Write-Progress -Id 2 -Activity "Second Write Progress" -Status "Current Count: $j" -PercentComplete (($j/10)*100) -CurrentOperation "Counting ..." | |
For ($k=0; $k -le 20; $k++) { | |
Start-Sleep -Milliseconds 1 | |
Write-Progress -Id 3 -Activity "Third Write Progress" -Status "Current Count: $k" -PercentComplete (($k/20)*100) -CurrentOperation "Counting ..." | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment