Working with the PowerShell pipeline

suggest change

Introduction

PowerShell sends whole objects down the pipeline to the next command, or to the host when nothing consumes them. Unlike a text pipeline, the data is not parsed from columns. A command can take pipeline input, and any objects it writes go to the pipeline.

Syntax

Remarks

The pipeline delivers one object at a time. It does not pass the whole array into process unless the command is written to collect it.

continue inside process does not mean "next object." It can leave the function and skip end. Use return to finish the current process invocation and move to the next object.

$OutputEncoding is the encoding PowerShell uses when it passes text to a native program. Set it to [Console]::OutputEncoding when that program expects the console encoding.

More on $OutputEncoding: https://devblogs.microsoft.com/powershell/outputencoding-to-the-rescue/

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents