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?


