title: Cannot remove item. The directory is not empty
body: <p>I am trying to delete a folder with subfolders/files.</p>
  
  <pre><code>Remove-Item -Force -Recurse -Path $directoryPath
  </code></pre>
  
  <p>I am getting the error <code>Cannot remove item. The directory is not empty.</code></p>
  
  <p>My <strong>PowershellScript.ps1</strong> has <strong>executionPolicy unrestricted</strong>.
  The root folder I try to delete with the current logged in user has <strong>full permission</strong> on this folder.</p>
  
  <p>On my local pc the code works but not on my <code>Windows Server 2012 R2</code>.</p>