I am using the following code to display few lines of text using write-host at the beginning of the screen. And after that i am using a Write-Progress to display a progress percentage. But always the write progress is displayed over the write-host. Is there a way i can display the text initially at the first top of the screen and display the progress.
Here's the following code i used.
Write-host "1"
Write-host "2"
Write-host "3"
Write-host "3"
Write-host "3"
Write-host "3"
Write-host "3"
Write-host "3"
$host.privatedata.ProgressBackgroundColor = "black";
Function ProgressPercent ($val)
{write-progress -activity "Working..." -status "$val Complete.";
sleep 1}
ProgressPercent "10%"
ProgressPercent "20%"
ProgressPercent "30%"
ProgressPercent "40%"
ProgressPercent "50%"