$sb = { foreach ($process in $input) { $process.ProcessName } } get-process | &$sb