Say I only want to pipe my output to another function depending on the value of a variable, is there some way to do this in powershell?
Example :
if ($variable -eq "value"){$output | AnotherFunction}
else {$output}
@mjolinor's example is how I am doing it now, just curious if there is a better way to do it.