title: Catch `Get-ChildItem` errors on a file-by-file basis
body: <p>I'm using <code>Get-ChildItem -Recurse</code> to search a directory. I can't guarantee that everything <code>Get-ChildItem</code> will hit will be accessible. I want to log these failures, but not fail the entire <code>Get-ChildItem -Recurse</code> command. Right now I have</p>
  
  <pre><code>Get-ChildItem -Recurse $targetdir -ErrorAction Inquire `
          | where { $_.Name -eq $name } `
          | foreach {
              echo-indented "Found $(hash $_) at $($_.FullName)"
              $_
          }
  </code></pre>
  
  <p>The code in question is the <code>-ErrorAction Inquire</code>. If I did <code>-ErrorAction Stop</code>, I would have to put a try-catch somewhere. It would have to be around the entire pipeline, right? In that case, childitems that would have been found after the inaccessible one will not be found and written out. So what else can I do?</p>