title: Delete children directories in powershell including symlinks
body: <p>Currently experiencing issue, I'm currently doing this: </p>
  
  <pre><code>Get-ChildItem $PATH -Recurse -ErrorAction SilentlyContinue | 
    Where-Object {($_.Attributes -notmatch '\"Directory\"') -and  
                ($_.LastWriteTime -lt (Get-Date).AddHours(-12))}| 
      Remove-Item -Force -Recurse
  </code></pre>
  
  <p>Now, it would delete fine IF I didn't have symlinks, but I do. I am getting this error:  </p>
  
  <blockquote>
    <p>Remove-Item : There is a mismatch between the tag specified in the request and the tag present in the reparse point
    At line:1 char:184
    + ...  ($_.LastWriteTime -lt (Get-Date).AddHours(-12))}| Remove-Item -Force
    +                                                        ~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Remove-Item], Win32Exception
        + FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand </p>
  </blockquote>
  
  <p>I'm unable to upgrade powershell to v6. It seems to be related to:<a href="https://github.com/powershell/powershell/issues/621#issuecomment-289230180" rel="noreferrer">https://github.com/powershell/powershell/issues/621#issuecomment-289230180</a> </p>
  
  <p>Anyone have a workaround?  </p>