title: PowerShell execute external command in same window
body: <p>I am trying to execute an external command using powershell, without having the second program to popup, I need to execute this program within the same PowerShell window and output both the log and the errors.
  I started with this:</p>
  
  <pre><code>$outcome = Start-Process -Wait -FilePath "cmd.exe" -ArgumentList "dir" -NoNewWindow 2&gt;&amp;1
  $outcome
  </code></pre>
  
  <p>But it doesn't work as expected. I still see the new window popping up with DOS and no redirect at all about the output, the errors and so on.
  Am I doing something wrong?</p>