Closed
Description
Issue Description
Running a script with Write-Progress
screws up the console.
Example Script
function MyAwesomeScript {
[CmdletBinding()]
param (
[Parameter()]
[string]
$Name
)
$WelcomeMessage = @();
for ($i = 0; $i -lt 50; $i++) {
Write-Progress -Activity "Getting ready to greet you!" -PercentComplete ($i/50*100)
$WelcomeMessage += "Hello $Name"
}
$WelcomeMessage
}
MyAwesomeScript -Name Micah
Expected Behaviour
Should look like this (example taken from pwsh running in VSCode):
Actual Behaviour
Looks like this:
The prompt is getting rendered towards the top instead of at the end of the content