Buffering Up the Pipeline
In several of the last articles, I’ve alluded to how PowerShell passes objects down the pipeline. Most of the time, we don’t worry about it, and PowerShell works as expected. But there is another common parameter that will let you adjust the pipeline. Although, it really may be considered a resource management technique. Today, I want to demonstrate the common OutBuffer
parameter along with other ways to buffer or manage the flow of objects in the pipeline.
OutBuffer
By default, PowerShell sends each object to the pipeline as it is processed. In an advanced function, this is typically during the Process scriptblock. This can be hard to visualize, so I wrote a few demonstration functions.
Want to read the full issue?