title: How do I capture the output into a variable from an external process in PowerShell?
body: <p>I'd like to run an external process and capture it's command output to a variable in PowerShell.  I'm currently using this:</p>
  
  <pre><code>$params = "/verify $pc /domain:hosp.uhhg.org"
  start-process "netdom.exe" $params -WindowStyle Hidden -Wait
  </code></pre>
  
  <p>I've confirmed the command is executing but I need to capture the output into a variable.  This means I can't use the -RedirectOutput because this only redirects to a file.</p>