title: TFS 2013 default template run powershell script and log output
body: <p>running a powershell script from within a build process has become really really straight forward with VS 2013. Unfortunately no write-host commands are being logged to the tfs build log.</p>
  
  <p><strong>So after a build completed I cannot look into the log file and see what the powershell shell script</strong> actually did.</p>
  
  <p>The log file only says:</p>
  
  <pre><code>Run optional script after MSBuild 00:03
  Run optional script before Test Runner 00:00
  Run VS Test Runner 00:00
  Run optional script after Test Runner 00:00
  ...
  </code></pre>
  
  <p>The ActivityLog.AgentScope.1.xml log file is more talkative but still has too few information.</p>
  
  <pre><code>Run optional script after MSBuild00:00:03
  InputsEnvironmentVariables: 
  Enabled: True
  Arguments: 
  FilePath: $/CMP04/Some/Project/Main/Web/.scripts/CI/CI.ps1
  
  OutputsResult: 0
  
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy RemoteSigned -NoProfile -NonInteractive -File "D:\ws_build\1\CMP04\IP-Main\src\Some\Project\Main\Web\.scripts\CI\CI.ps1"
  </code></pre>
  
  <p>Any idea how I can get any debugging information into the tfs build logs?
  <em>I could of course create an extra log file, but that is plan b :)</em></p>
  
  <p><strong>edit:</strong> write-host is being logged to the agent's log xml. write-verbose is not.</p>