title: Powershell append line to variable in for loop
body: <p>I have a foreach loop and use the write-host cmdlet to write to the console.
  I now wish to write the lines into a variable that will store all of the result from the loop.
  What is the cmdlet/syntax for this?</p>