<# .SYNOPSIS Continue script action after interuption. .DESCRIPTION Using 'try : finally' blocks to continue some action, even if the user stops the script preemptively. .NOTES Additionally, the stationary loop counter showed me that when calculating the length of an integer, you can convert it to a string. #> Try { $counter = 0 Write-Host "`nThis script will not stop on its own" -fore yellow Write-Host "Press 'Ctrl+C' to stop the current script...`n" Write-Host "Loop: " -NoNewline While ($True) { # Runs ad infinitum Write-Host ("$counter" + ("`b" * $counter.tostring().length)) -NoNewline Start-Sleep 1 $counter++ } } Finally { Write-Host "`nScript has been terminated." -fore red; "" }