PowerShell/docs/write-progress-bar.md
2025-05-12 22:04:02 +02:00

731 B

The write-progress-bar.ps1 Script

write-progress-bar.ps1

Parameters



[<CommonParameters>]
    This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, 
    WarningVariable, OutBuffer, PipelineVariable, and OutVariable.

Script Content

$progressBar = @('⣾','⣽','⣻','⢿','⡿','⣟','⣯','⣷')
$progressIndex = 0
    
do {
	Write-Host "`r$($progressBar[$progressIndex]) Working on something..." -NoNewline
	$progressIndex = ($progressIndex + 1) % $progressBar.Length
	Start-Sleep -milliseconds 100
} while ($true)

(page generated by convert-ps2md.ps1 as of 05/12/2025 22:02:59)