title: PowerShell: how to capture (or suppress) write-host
body: <p>I have a script call "a.ps1":</p>
  
  <pre><code>write-host "hello host"
  "output object"
  </code></pre>
  
  <p>I want to call the script and obtain the output object, but I also want the standard output to be suppressed:</p>
  
  <pre><code>$result = .\a.ps1
  # Don't want anything printed to the console here
  </code></pre>
  
  <p>Any hint?</p>