title: Why following PowerShell show error after add redirection at the end of line?
body: <p>I have an python script which will invoke the <code>nmake</code>. I want to invoke this script in powershell as following.</p>
  
  <pre><code>python D:\build.py -f folder
  </code></pre>
  
  <p>It works fine and the output is as following:</p>
  
  <pre><code>Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
  Copyright (C) Microsoft Corporation.  All rights reserved.
  </code></pre>
  
  <p>But if I add the redirection to make all the <code>stderr&amp;stdout</code> goes to <code>build.log</code> as following, it show red errors:</p>
  
  <pre><code>python D:\build.py -f folder 2&gt;&amp;1 | tee build.log
  
  python :
  At line:1 char:1
  + python D:\source_code\media\media\build_system\build.py -f xplatform_ ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : NotSpecified: (:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
  
  Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
  Copyright (C) Microsoft Corporation.  All rights reserved.
  </code></pre>
  
  <p>---- Edit 1---- </p>
  
  <p>I understand possible reason is the external <code>nmake</code> executable write to <code>stderr</code>, then Powershell show error.</p>
  
  <p>But the first example, which without redirection, doesn't show error. And the second one, which have redirect <code>stderr</code> to <code>stdout</code>, actually show errors. So any reason?</p>