This almost does what I need
Code: Select all
# Countdown function
function Start-Countdown {
$Countdown = 2
while ($Countdown -gt 0) {
Write-Host ("Countdown: $Countdown seconds") -NoNewline
Start-Sleep -Seconds 1
$Countdown--
Write-Host "`r" -NoNewline
}
}
# Start the countdown
Start-Countdown
# Clear the countdown line
Write-Host "`r"
# Modifications of prompt
$Prompt = " " * 2 + ""
Write-Host $Prompt -NoNewline
# Wait for input from user
Read-Host ""
instead ofppp:p_
[where each >>p<< represent a white pause]pppp
Where is that splitting >>:<< sign coming from? And more importantly: how to get rid of it?