title: replace the first line of text from a file
body: <p>I would like to copy a file from one location to another, and replace the first line of text with a string. I almost have the script complete, but not quite there.. (see  below)</p>
  
  <pre><code># -- copy the ASCX file to the control templates
  $fileName = "LandingUserControl.ascx"
  $source = "D:\TfsProjects\LandingPage\" + $fileName
  $dest = "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\LandingPage"
  #copy-item $source $dest -Force
  
  # -- Replace first line with assembly name
  $destf = $dest + "\" + $fileName
  $destfTemp = $destf + ".temp"
  Get-Content $destf | select -skip 1 | "&lt;text to add&gt;" + $_) | Set-Content $destfTemp
  </code></pre>