title: How to overwrite files with Copy-Item in PowerShell
body: <p>I am trying to copy content of a folder, but there are two files which I would like to exclude. The rest of all the content should be copied to a new location and existing content on that new location should be overwritten.</p>
  
  <p>This is my script. It works fine if my destination folder is empty, but if I have files and folder, it doesn't overwrite them.</p>
  
  <pre><code>$copyAdmin = $unzipAdmin + "/Content/*"
  $exclude = @('Web.config','Deploy')
  Copy-Item  -Path $copyAdmin -Destination $AdminPath -Exclude $exclude -Recurse -force
  </code></pre>