title: powershell writing to a log file
body: <p>I've written the code below which works fine apart from one of the variables is over 200 characters and goes onto the next line messing the layout up.  Any suggestions on a better layout so if one of the variables is long, it still retains structure?</p>
  
  <pre><code>$WriteLog = $null 
  $WriteLog = @()
  $WriteLog +="Here is some stuff:                $stuff1"
  $WriteLog +="Here is some stuff:                $stuff2"
  $WriteLog +="Here is some stuff:                $stuff3"
  $WriteLog +="Here is some stuff:                $stuff4"
  $WriteLog +="Here is some stuff:                $stuff5"
  $WriteLog +="Here is some stuff:                $stuff6"
  Out-File -InputObject $WriteLog -Append -NoClobber -FilePath "$env:SystemDrive\somestuff\somestuff.txt"
  </code></pre>
  
  <p>Example output :</p>
  
  <pre><code>"Here is some stuff:                    stuff1"
  "Here is some stuff:            stuff2"  
  "Here is some stuff:                Heres a lot of stuff
  stuff3, stuff3, stuff3, stuff3,  stuff3, stuff3" 
  "Here is some stuff:            stuff4"  
  "Here is some stuff:                    stuff5"
  "Here is some stuff:                    stuff6"
  </code></pre>