title: Remove-item with -Recurse and -Force does not remove all files and folders
body: <p>In Powershell I have a script which should clear out a folder of project files retrieved from TFS.</p>
  
  <p>The command is simply:</p>
  
  <pre><code>$deletePath = 'c:\Compile\*'
  Remove-Item $deletePath -Recurse -Force
  </code></pre>
  
  <p>Before running there are about 150 folders in c:\Compile, afterwards there are 3 folders left.</p>
  
  <p>The script generates 5 errors</p>
  
  <pre><code>Remove-Item : Cannot remove item C:\Compile\DatabaseObjects: The directory is not empty.
  Remove-Item : Cannot remove item C:\Compile\IFIFWCHG\obj: The directory is not empty.
  Remove-Item : Cannot remove item C:\Compile\IFIFWCHG: The directory is not empty.
  Remove-Item : Cannot remove item C:\Compile\PrecompiledWeb\IIS: The directory is not empty.
  Remove-Item : Cannot remove item C:\Compile\PrecompiledWeb: The directory is not empty.
  </code></pre>
  
  <p>I thought because of the use of -Force it handled the files/folders in directories.</p>
  
  <p>The funny thing is, the DatabaseObjects folder is empty after the script runs, so it seems like it is trying to delete the folder before deleting the files.</p>