Powershell progress dialogs
- by Norgean
Creating nested progress dialogs in Powershell is easy. Let the code speak for itself: for ($i = 1; $i -le 2; $i++) { Write-Progress -ID 1 -Activity "Outer loop" -Status "Tick $i" -percentComplete ($i / 2*100) for ($j = 1; $j -le 3; $j++) { Write-Progress -ID 2 -Activity "Mid loop" -Status "Tick $j" -percentComplete ($j / 3*100) for ($k = 1; $k -le 3; $k++) { Write-Progress -ID 3 -Activity "Inner loop" -Status "Tick $k" -percentComplete ($k / 3*100) Sleep(1) } } } I.e. some text that explains what we're doing (Activity and Status), and ID numbers. Easy.