You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When any Function writes $null to the output stream, this causes the following error:
ERROR: Trace-PipelineObject : Cannot bind argument to parameter 'InputObject' because it is null.
The $null value can be hardcoded, returned from a cmdlet or a function, etc. For example, each of the following lines causes this error:
$nullWrite-Output$nullGet-Something# This command returns $null
Workaround
Avoid writing $null to output. If you invoke a command that may return $null, capture the value by assigning it to a variable, or pipe it to Out-Null, for example: