Show a Progress Bar in PowerShell

Display a built-in progress bar while a loop runs.

WindowsTerminalpowershellproductivityLow risk
Run the loop to show a progress bar advancing from 0 to 100 percent.

01Command

Command
$ 1..100 | ForEach-Object { Write-Progress -Activity "Processing" -PercentComplete $_ -Status "$_%"; Start-Sleep -Milliseconds 30 }

02What it does

Write-Progress renders a native console progress bar driven by -PercentComplete. Use it inside loops that process many items so users get feedback; pass -Status for the current item and -Activity for the overall task name.

03Risk

RiskLow risk
RequirementsWindows 10/11 with PowerShell 5.1 or PowerShell 7+
!Warning: Writing progress too frequently slows the script; update every N iterations for very tight loops.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • Write-Progress
    Microsoft Learn · vendor-doc · 2026-09-20
    Evidence: Displays a progress bar in the console; one of PowerShell's progress cmdlets.

Last verified: 2026-09-20 · Category: System & Settings

06Related solutions