Parameter binding byValue connects pipeline commands by comparing the type of each object produced by one command with the parameter types accepted by the next. PowerShell tries ByValue first, then ByPropertyName. Commands receive pipeline data through parameters, so the binding determines where each object goes. section 10.2
Check a proposed ByValue binding in three practical steps:
- Inspect the incoming object type with Get-Member. section 10.3
- Read the receiving command’s full help and look for a parameter accepting that type from pipeline ByValue. section 10.3
- Confirm that the receiving parameter has the meaning you need, not merely a compatible type. section 10.3
Module names through the pipeline
Get-Content ./modules.txt produces System.String objects. Get-Module accepts strings from the pipeline ByValue through its -Name parameter, so this command treats each line as a module name: Get-Content ./modules.txt | Get-Module. A similar pipeline to Get-Command does not meet the goal: its compatible -Name parameter interprets the strings as command names, not module names. section 10.3 section 10.3
When ByValue is unavailable
Get-Process documents -Id as accepting pipeline input ByPropertyName, not ByValue. Likewise, piping strings to New-AzKeyVault fails when no parameter accepts those objects from the pipeline. Use a different command shape or inspect the receiving parameter before assuming a pipeline will work. section 15.3 section 15.3
Get-Content.\modules.txt | Get-Command
Use the concrete pipeline listing to see text-file output flow into a receiving command. section 10.2
PS /Users/tylerl> Get-Command -Module (Get-Content ./modules.txt)
Compare pipeline binding with a parenthetical command, which passes results directly to a parameter instead of relying on pipeline binding. section 10.7

