mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-16 05:24:59 +02:00
31 lines
731 B
Markdown
31 lines
731 B
Markdown
The *write-progress-bar.ps1* Script
|
|
===========================
|
|
|
|
write-progress-bar.ps1
|
|
|
|
|
|
Parameters
|
|
----------
|
|
```powershell
|
|
|
|
|
|
[<CommonParameters>]
|
|
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
|
|
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
|
|
```
|
|
|
|
Script Content
|
|
--------------
|
|
```powershell
|
|
$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)*
|