title: Powershell 4.0 Transcript is not capturing output of Write-Host statements
body: <p>I have created following script(test.ps1) and I am executing it from command line as "powershell .\test.ps1"</p>
  
  <pre><code>Write-Host(Start-Transcript -Path "D:\logs.txt")
  $remoteScript = {
      Write-Host "Remote Log"
  }
  Invoke-Command -ConnectionUri $uri -Credential $creds -ScriptBlock $remoteScript
  Write-Host "Local Log"
  Write-Host(Stop-Transcript)
  </code></pre>
  
  <p>However in the log file generated after executing script, I do not see the log statement either remote or local. This used to work with Powershell 3.0 but recently I upgraded to Powershell 4.0 and it stopped working. </p>
  
  <p>Has anyone faced similar issue or is aware of any other way to capture output from remote and local commands?</p>
  
  <p>Thanks,</p>
  
  <p>Gaurav</p>