title: Powershell - Creating a blank CSV
body: <p>I am trying to create a blank CSV file with headers only.
  I have the following code - </p>
  
  <pre><code>$headers = "Type", "Base", "Status"
  $psObject = New-Object psobject
  foreach($header in $headers)
   {
    Add-Member -InputObject $psobject -MemberType noteproperty -Name $header -Value ""
   }
  $psObject | Export-Csv "d:\test.csv" -NoTypeInformation -Force
  
  $now = get-date -Format "ddd MMM dd HH:mm:ss BST yyyy"
  $status = "&lt;!&gt;Status,Last ran at $now"
  $status &gt;&gt; "d:\test.csv" 
  </code></pre>
  
  <p>This creates the CSV but i get a blank line after the Headers and before the status. When I open the CSV I can see the following below the headers</p>
  
  <pre><code>"Type","Base","Status"
  "","",""
  &lt; ! &gt; S t a t u s , L a s t   r a n   a t   F r i   J u n   1 7   1 6 : 0 5 : 4 2   B S T   2 0 1 6 
  </code></pre>
  
  <p>I think <code>"","",""</code> is causing the blank lines because of <code>-Value ""</code>. I tried <code>-Value $null</code> and still getting a blank line. If I remove value completely then I get prompted for a value.</p>
  
  <p>How do I remove the blank line this creates? </p>