Title: Write-Progress incorrectly shows 100% until 1% of the task is completed · Issue #18850 · PowerShell/PowerShell · GitHub
Open Graph Title: Write-Progress incorrectly shows 100% until 1% of the task is completed · Issue #18850 · PowerShell/PowerShell
X Title: Write-Progress incorrectly shows 100% until 1% of the task is completed · Issue #18850 · PowerShell/PowerShell
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 reprodu...
Open Graph 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 PowerSh...
X 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 PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18850
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Write-Progress incorrectly shows 100% until 1% of the task is completed","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://docs.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\n```\r\nfor ($i = 0; $i -le 2; $i += 0.1) { \r\n Write-Progress -Activity 'DEMO' -Status $i -PercentComplete ([int]$i)\r\n Start-Sleep 1\r\n}\r\n\n\n### Expected behavior\n\n```console\nThe progress bar shows 0% before 1% of the task is completed.\n```\n\n\n### Actual behavior\n\n```console\nThe progress bar shows 100% before 1% of the task is completed.\r\n\r\nIn Windows PowerShell 5.1 the code snippet works as expected.\n```\n\n\n### Error details\n\n```console\nNo error\n```\n\n\n### Environment data\n\n```powershell\n$PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 7.3.1\r\nPSEdition Core\r\nGitCommitId 7.3.1\r\nOS Microsoft Windows 10.0.19045\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} \r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\n```\n\n\n### Visuals\n\n_No response_","author":{"url":"https://github.com/wi-fr","@type":"Person","name":"wi-fr"},"datePublished":"2022-12-26T15:37:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/18850/PowerShell/issues/18850"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3b2e91c9-fed4-e719-6ae8-fdfa964c6c52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CEB8:A72D1:EE7AAE:14551C8:6A5569F0 |
| html-safe-nonce | 65e4807d4bf96c40757875d5051ee6c6ff0727ad385d8780b1c7b9b61eec1417 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRUI4OkE3MkQxOkVFN0FBRToxNDU1MUM4OjZBNTU2OUYwIiwidmlzaXRvcl9pZCI6IjI1NTAwMDUzMjE4ODUzNzkwNTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8f40affb998bcde1f01455922513dcbf1d4c0f50fd5ef4e4429611a30af37a08 |
| hovercard-subject-tag | issue:1511043388 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/18850/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4c71b2e6ac2cbc4b59105e837ce0bf8e4e063124471da9a4d2ff46a43ec1561e/PowerShell/PowerShell/issues/18850 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4c71b2e6ac2cbc4b59105e837ce0bf8e4e063124471da9a4d2ff46a43ec1561e/PowerShell/PowerShell/issues/18850 |
| og:image:alt | 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 PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | wi-fr |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8201d0b7bc32164c4662de52242e463a356df543 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width