Complete the code to accept pipeline input for the parameter.
param([Parameter(ValueFromPipeline=[1])]$Name)
process { Write-Output $Name }The parameter attribute ValueFromPipeline must be set to $true to accept pipeline input.
Complete the code to process each pipeline input object.
process {
Write-Output [1]
}Inside the process block, $PSItem represents the current pipeline object.
Fix the error in the parameter declaration to accept pipeline input by property name.
param([Parameter(ValueFromPipelineByPropertyName=[1])]$Age)The ValueFromPipelineByPropertyName attribute must be set to $true to accept pipeline input by property name.
Fill both blanks to create a parameter that accepts pipeline input by value and process it.
param([Parameter(ValueFromPipeline=[1])]$Item) process { Write-Output [2] }
Set ValueFromPipeline to $true to accept pipeline input, and output the current item with $Item.
Fill all three blanks to accept pipeline input by property name and output the property value.
param([Parameter(ValueFromPipelineByPropertyName=[1])] $Name) process { Write-Output [2].[3] }
Set ValueFromPipelineByPropertyName to $true to accept input by property name. Inside process, $PSItem.Name accesses the property value.