Hi all,
I need to run two powershell commands one after the other, should I create a pipeline twice or is there a better option? Thanks
Runspace myRunSpace = RunspaceFactory.CreateRunspace(rc);
myRunSpace.Open();
Pipeline pipeLine = myRunSpace.CreatePipeline();
using (pipeLine)
{
Command myCommand = new Command("Get-Command...");
}
Pipeline pipeLine2 = myRunSpace.CreatePipeline();
using (pipeLine2)
{
Command myCommand = new Command("Get-Command...");
}