title: PowerShell Add-Content with multiple variables to columns
body: <p>Using <code>Add-Content</code> to input multiple variables to a csv file will write each variable to the csv in a new row, such as the following:</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>$name, $dateTime, $task | Add-Content $csv  -Force
  </code></pre>
  
  <p><strong>Results</strong></p>
  
  <pre><code>$name
  $dateTime
  $task
  </code></pre>
  
  <p>I would like to loop the above code with new variable values each time but would prefer the variables to input to new columns for results such as the following:</p>
  
  <pre><code>$name $dateTime $task
  $name $dateTime $task
  $name $dateTime $task
  </code></pre>
  
  <p>How can I modify my code to input each of the 3 variables into a new column, then on the next pass, input the 3 new values on the next row across columns 1,2 and 3 like the above example?</p>
  
  <p>Thanks</p>