Windows PowerShell 4.0 Examples – PipelineVariable Common Parameter

Last Updated on

In PowerShell 4.0, the PipelineVariable lets you save the results of a piped command (or part of a piped command) as a variable that can be passed through the remainder of the pipeline. Its alias is “pv”.

1
Get-ChildItem *.ps1 -pv a | Get-Acl | foreach {"{0} size is {1}" -f $a.Name, $a.length}
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply