On the other hand, Get-ChildItem has an -exclude parameter. It must be faster than piping to Where-Object. Why not use that instead? To my surprise the combination of -filter and -exclude parameters produced totally wrong result.

Fortunately, Get-ChildItem has an -include parameter too, which can be used instead of a -filter in this case (hat tip to Joel 'Jaykul' Bennett). So, the final command is: