test 3 for white space

Finally, execute the commands in the pipeline and do something with the output:

Collection output = pipeline.Invoke();
foreach (PSObject psObject in output)
{
     Process process = (Process)psObject.BaseObject;
     Console.WriteLine(“Process name: ” + process.ProcessName);
}

foreach (PSObject psObject in output)
{
   Process process = (Process)psObject.BaseObject;
   Console.WriteLine(“Process name: ” + process.ProcessName);
}

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts