![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | PowerShell: how to read Pipe.Input from a script? BTW: let me know if it's a wrong forum? Where is the PowerShell forum? I've integrated the PS into my project and trying to invoke a script, but, before hand, I'd like to populate a new pipeline with some data so the script can process it, but, after writing it to the pipeline, I can't access it from the script. How do I do this? Here is the host code snippet: foreach (PSObject obj in InputPipeline) { pipeline.Input.Write(obj); } pipeline.Input.Close(); OutputPipeline = pipeline.Invoke(); foreach (PSObject result in OutputPipeline) { // .... Do stuff here } And this is the list of different command permutations I've tried to run (let's say I want just to print the input items): $input | % "data: $_" % "data: $_" "data: $_" Nothing worked. Any ideas? |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Using pipe in Powershell | PowerShell | |||
| Functions: Taking input from the Pipe | PowerShell | |||
| pipe to non-powershell process | PowerShell | |||
| PowerShell: how to read Pipe.Input from a script? | PowerShell | |||
| strange PowerShell pipe semantics | PowerShell | |||