Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
for ($i = 0; $i -le 2; $i += 0.1) {
Write-Progress -Activity 'DEMO' -Status $i -PercentComplete ([int]$i)
Start-Sleep 1
}
### Expected behavior
```console
The progress bar shows 0% before 1% of the task is completed.
Actual behavior
The progress bar shows 100% before 1% of the task is completed.
In Windows PowerShell 5.1 the code snippet works as expected.
Error details
No error
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 7.3.1
PSEdition Core
GitCommitId 7.3.1
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response