Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. $status = "processing";
  2.  
  3. # write first message with -NoNewLine
  4. write-host $status -NoNewline;
  5.  
  6. foreach ($i in 1..3) {
  7. sleep 1
  8. $status += "."
  9. # Write All updated messages starting with carriage return (`r) and -NoNewLine
  10. write-host "`r$status" -NoNewline
  11. }
  12.  
  13. # To append a final message, exclude -NoNewLine
  14. write-host " complete!";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement