title: Powershell redirect stderr and stdout to two different places
body: <p>How do redirect    </p>
  
  <ul>
  <li>stderr to logfile</li>
  <li>stdout to object</li>
  </ul>
  
  <p>Things I've looked at:</p>
  
  <p><code>&gt;&gt;</code> and <code>2&gt;&gt;</code> only redirect to file .<br>
   <code>-RedirectStandardOutput</code> and <code>-RedirectStandardError</code> only redirect to file again.<br>
   <code>| Out-File</code> cannot redirect stderr.<br>
   <code>| Tee-Object</code> same issue. </p>