An InputObject parameter accepts an input object, including pipeline values. Because PSObject is broadly equivalent to .NET’s Object type, a parameter accepting PSObject can receive almost anything. ConvertTo-HTML uses –InputObject to accept objects by value and represent them as HTML. section 4.3
Convert process objects to HTML
Get-Process | ConvertTo-HTML | Out-Null sends each process object to ConvertTo-HTML’s –InputObject parameter. Named and positional arguments bind first, so manually specifying –InputObject would prevent this ByValue binding. section 4.3 section 4.3.2
PS C:\> trace-command -Expression { get-process | convertto-html |
out-null } -Name ParameterBinding -PSHost
Trace parameter binding to watch Get-Process, ConvertTo-HTML, and Out-Null bind pipeline objects and generated strings to their InputObject parameters. section 4.3.2
