August 23, 2010
An example how to use Write-Progress if you don't have a loop:
001 002 003 004 005 006 007 008 009 010 011 012 013 | Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "1" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "20" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "40" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "60" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "80" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Wait..." -PercentComplete "100" -Id 1 Start-Sleep -s 3 Write-Progress -Activity "Collecting Information" -status "Completed" -Completed -Id 1 |
Subscribe to:
Post Comments (Atom)
Blog Archive
Tags
Links
About Me
- Catherina
- I took the PowerShell Master Class for Thomas Lee in Stockholm in march 2010.
0 kommentarer:
Post a Comment