Prerequisites
Steps to reproduce
Run the script:
[Console]::CursorVisible = $false
Write-Host "Before wp - " -NoNewLine
[Console]::CursorVisible
0..10 | % {
Write-Progress -Activity test -Status test -PercentComplete $_
Start-Sleep -s 0.1
}
Write-Host "After wp - " -NoNewLine
[Console]::CursorVisible
Expected behavior
Write-Progress shouldn't affect the state of CursorVisible
Actual behavior
PS > .\script.ps1
Before wp - False
After wp - True
Error details
No response
Environment data
Name Value
---- -----
PSVersion 7.2.0
PSEdition Core
GitCommitId 7.2.0
OS Microsoft Windows 10.0.22000
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
Prerequisites
Steps to reproduce
Run the script:
Expected behavior
Write-Progressshouldn't affect the state ofCursorVisibleActual behavior
Error details
No response
Environment data
Visuals
No response