liveBook · Manning

Pipeline parameter binding bypropertyname

Pipeline parameter binding by property name binds an input object's property value to a command parameter with a matching name.

How 2 Manning books explain it

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Pipeline parameter binding byPropertyName is PowerShell's mechanism for binding a pipeline input object's property value to a command parameter with a matching name.

How it is used
Connects pipeline object properties to matching command parameters when direct ByValue binding cannot accept the input.
How deep it goes
Explains matching, help verification, multiple bindings, bad values, and property renaming, but stops short of scripting-language internals.
Examples
Demonstrates Get-ChildItem to Stop-Process, Import-Csv to New-Alias, and renamed CSV properties piped to New-ADUser.
What you can do after
Diagnose binding failures with Get-Member and full help, then reshape objects so eligible parameters receive matching properties.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains pipeline parameter binding bypropertyname →

Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools

Parameter binding by property name is a PowerShell parameter-binding mode that passes an input object's property value to a command parameter with the same name.

How it is used
Connects pipeline objects to command parameters through matching property and parameter names.
How deep it goes
Explains matching, multiple-property binding, tracing, failure modes, and advanced-function parameter declarations.
Examples
Uses Stop-Job tracing, Import-CSV with New-ADUser, and Get-MachineInfo parameters accepting property-name input.
What you can do after
Diagnose pipeline binding with Trace-Command and design advanced functions that accept matching object properties.

Read how Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools explains pipeline parameter binding bypropertyname →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.