Documentation Index
Fetch the complete documentation index at: https://tally.wharflab.com/llms.txt
Use this file to discover all available pages before exploring further.
powershell/PSUseSingleValueFromPipelineParameter is a PSScriptAnalyzer diagnostic emitted by tally for PowerShell snippets embedded in Dockerfiles.
| Property | Value |
|---|---|
| Severity | Warning |
| Category | PSScriptAnalyzer |
| Auto-fix | No |
Description
Parameter sets should have at most one parameter marked asValueFromPipeline = true.
This rule identifies functions where multiple parameters within the same parameter set have
ValueFromPipeline set to true (either explicitly or implicitly).
How
Ensure that only one parameter per parameter set accepts pipeline input by value. If you need multiple parameters to accept different types of pipeline input, use separate parameter sets.Examples
Problematic code
Correct code
Suppression
To suppress this rule for a specific parameter set, use theSuppressMessage attribute with the
parameter set name:
'default' as the suppression target:
Notes
- This rule applies to both explicit
ValueFromPipeline = $trueand implicitValueFromPipeline(which is the same as using= $true) - Parameters with
ValueFromPipeline=$falseare not flagged by this rule - The rule correctly handles the default parameter set (
__AllParameterSets) and named parameter sets - Different parameter sets can each have their own single
ValueFromPipelineparameter without triggering this rule