0

I use several 'Runspace' in parallel, they displays in the same console (in color) but all appears mixed and illegible.

is there a way to suspend or buffering "write-host" and release them by block ?

Alban
  • 3,105
  • 5
  • 31
  • 46
  • Create a `ConcurrentQueue`, set it as [a `SessionStateProxy` variable entry](https://stackoverflow.com/questions/38102068/sessionstateproxy-variable-with-runspace-pools), then have the runspaces write their log messages (and coloring info) to that, and then dequeue the messages from that in the default runspace and call `Write-Host` – Mathias R. Jessen Mar 07 '19 at 11:57
  • 1
    [Write-Host Considered Harmful](http://www.jsnover.com/blog/2013/12/07/write-host-considered-harmful/). – JosefZ Mar 07 '19 at 19:19

0 Answers0