title: Write-Host => Export to a file
body: <p>I have got a script with some commands such as <code>Write-Host "Server1"</code>. How can I export it to a file?</p>
  
  <p>When I tried with <code>script &gt; export.txt</code> it didn't work.</p>