Improved write-progress-bar.ps1

This commit is contained in:
Markus Fleschutz
2025-07-31 19:28:39 +02:00
parent a584308995
commit fd6d2506b6

View File

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