This can be determined by: ~~~PowerShell $MyInvocation.PipelinePosition -lt $MyInvocation.PipelineLength ~~~