title: C# Piping commands into PowerShell
body: <p>I need to run two powershell commands one after the other, should I create a pipeline twice or is there a better option? Thanks</p>
  
  <pre><code>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...");
              }
  </code></pre>