Powershell: Pipe the output to a method and separate the error stream

I’m trying to pipe the output of my script to a separate method and trying to separate the error stream there. Here is the pipeline.ps1 Function MyLogs{ [CmdletBinding()] Param( [Parameter(ValueFromPipeline=$True)] [String[]] $Log ) Begin { Write-Verbose "initialize stuff" # code to initialize stuff } Process { Write-Output " $Log" } End { # code to… Read More Powershell: Pipe the output to a method and separate the error stream