Hi, I’m giving a PowerShell class and one of the students asked a question related to the modes of processing data within a powershell pipeline (streaming vs. sequential mode)
Given a typical pipeline like:
Get-ChildItem | Sort-Object Length | Select-Object Length, Name | ForEach { … }
Will Sort-Object switch the entire pipeline to sequential processing meaning that all pipeline commands are executed one at a time
… or …
Will only Sort-Object hand over its entire (sorted) results to the next command while the rest of the pipeline remains in streaming mode or rather real-time processing.
Thanks