title: Delete directory regardless of 260 char limit
body: <p>I'm writing a simple script to delete USMT migration folders after a certain amount of days:</p>
  
  <pre><code>## Server List ##
  $servers = "Delorean","Adelaide","Brisbane","Melbourne","Newcastle","Perth"
  
  ## Number of days (-3 is over three days ago) ##
  $days = -3
  
  $timelimit = (Get-Date).AddDays($days)
  
  foreach ($server in $servers)
  {
      $deletedusers = @()
      $folders = Get-ChildItem \\$server\USMT$ | where {$_.psiscontainer}
      write-host "Checking server : " $server
      foreach ($folder in $folders) 
      {
          If ($folder.LastWriteTime -lt $timelimit -And $folder -ne $null)
          {
              $deletedusers += $folder
              Remove-Item -recurse -force $folder.fullname
          }
      }
          write-host "Users deleted : " $deletedusers
          write-host
  }
  </code></pre>
  
  <p>However I keep hitting the dreaded <code>Remove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.</code></p>
  
  <p>I've been looking at workarounds and alternatives but they all revolve around me caring what is in the folder.</p>
  
  <p>I was hoping for a more simple solution as I don't really care about the folder contents if it is marked for deletion.</p>
  
  <p>Is there any native Powershell cmdlet other than <strong>Remove-Item -recurse</strong> that can accomplish what I'm after?</p>