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.
The progress bar shows 100% before 1% of the task is completed.
In Windows PowerShell 5.1 the code snippet works as expected.
$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
Prerequisites
Steps to reproduce
Actual behavior
Error details
No errorEnvironment data
Visuals
No response