title: Powershell Export-CSV but Change Header Names
body: <p>I must be missing something super simple, but due to my inexperience in Powershell, all the resources available are very in depth answers.</p>
  <p>I have the following code which is to make a csv file with a directory's filename, modify date and creation date.  It is to exclude certain file paths which are children of this directory.</p>
  <p>Here is what I am trying to do:  Upon the output of the csv, change <em>LastWriteTime</em> header and <em>CreationTime</em> header to a different tag i.e. <em>Modified Time</em> or something else.</p>
  <p>What must I do to transform this code to modify the headers?  I have seen answers creating arrays and then exporting values, but I feel this is an overly complicated method.  What is the easiest way to accomplish changing the csv headers?</p>
  <pre><code>Get-ChildItem -path $pathlocation -recurse  |
   where {$_.fullname -notlike $PathsToExclude -and $_.PSIsContainer -eq $false} |
    Select-Object Name, LastWriteTime, CreationTime |
    Export-CSV -path $anotherpath -notypeinformation
  </code></pre>
  <p>The current csv headers show &gt; &quot;Name&quot;,&quot;LastWriteTime&quot;,&quot;CreationTime&quot;</p>
  <p>I want the headers to show &quot;File&quot;, &quot;Modify Date&quot;, &quot;Upload Date&quot;</p>
  <p>Thank you in advance!</p>