Skip to content

Instantly share code, notes, and snippets.

@NamedJason
Created May 31, 2017 15:02
Show Gist options
  • Save NamedJason/33d7440b0ad4fb413f0da80a19d23c4e to your computer and use it in GitHub Desktop.
Save NamedJason/33d7440b0ad4fb413f0da80a19d23c4e to your computer and use it in GitHub Desktop.
$items = 1..3
$i = 1
foreach ($item in $items){
write-progress -id 1 -activity "Parent Progress Bar" -status "Iteration $item" -percentComplete ($i++ / $items.count * 100)
$j = 1
foreach ($child in $items){
write-progress -parentId 1 -activity "Child Progress Bar" -status "Iteration $item`.$child" -percentComplete ($j++ / $items.count * 100)
Start-sleep 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment