Positional parameter binding lets PowerShell assign unnamed argument values according to the declared positions of a command’s parameters. The order of values supplies information that explicit parameter names would otherwise provide. section 4.2
PowerShell resolves command input in a predictable sequence:
- Binds named command-line arguments first, then positional arguments, and finally checks that mandatory parameters are present. section 4.3.2
- Performs this command-line binding before considering pipeline binding, so an explicitly supplied parameter can prevent ByValue binding from being considered. section 4.3.2
- Makes terse commands readable by rewriting omitted parameter names and exposing which parameters receive each value. section 4.2
Make the implicit explicit
A compact pipeline such as `Get-Service | Where-Object –Property Status –eq –Value "Running" | ConvertTo-HTML` exposes the parameters behind the shorter `Get-Service | Where Status –eq "Running" | ConvertTo-HTML` form. Expanding the names shows that `Where-Object` uses `-Property`, an equality operator, and `-Value`; the positional arrangement is no longer mysterious. section 4.2
PS C:\> trace-command -Expression { get-process | convertto-html |
out-null } -Name ParameterBinding -PSHost
Trace `ParameterBinding` while running a pipeline to observe named binding, positional binding, mandatory checks, and subsequent pipeline processing. section 4.3.2




