Update the write-host output in Powershell

Update the write-host output in Powershell is something I’ve been researching and all I could find where just a few answers on forums but nothing documented by technet nor in other blogs.
By “Update the write-host output in Powershell” I mean to actually replace what’s written in console without adding a new line.

For instance you want the console to update every second. See the example below:

Very simple to understand: you need `r and -NoNewLine so that you keep writing on the same line. In the example above you can clearly see how convenient this is in a cycle as well as in a standard output across the script.
Remember that after the latest -NoNewLine, you will have to add a carriage return to get the extra text in a new line.


Read More