Last active
August 24, 2018 15:26
-
-
Save techthoughts2/5ad7cffb6f80743bfc5c1ed0fa7a1625 to your computer and use it in GitHub Desktop.
Progress Bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Progress -Activity "Test" -PercentComplete 25 | |
Start-Sleep(5) | |
Write-Progress -Activity "Test" -PercentComplete 50 | |
Start-Sleep(5) | |
Write-Progress -Activity "Test" -PercentComplete 75 | |
Start-Sleep(5) | |
Write-Progress -Activity "Test" -PercentComplete 100 | |
#secind example of progress bar | |
$seconds = 60 | |
1..$seconds | | |
ForEach-Object { $percent = $_ * 100 / $seconds; | |
Write-Progress -Activity Break -Status "$($seconds - $_) seconds remaining..." -PercentComplete $percent; | |
Start-Sleep -Seconds 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment