Clear-Host
Write-Host ' '
$i = 0
55555, 4444, 333, 22, 1 | ForEach-Object {
$i++
Write-Progress -Activity (' 当前: ' + $_ + "`n") -Status "当前: $_" -PercentComplete ($i * 20)
Start-Sleep -Seconds 3
}
It should be 12345, but actually it is 1
and
Progress bar does not disappear
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
Expected behavior
Progress bar disappearsActual behavior
Error details
Environment data
Visuals