Summary: Use the –Filter parameter with the Get-ChildItem Windows PowerShell cmdlet.
Why can't I get the –Filter parameter to work with the Get-ChildItem cmdlet?
Try using the FileSystem provider. The –Filter parameter will accept two wildcard characters ( ? and * )
and a single string as a filter (not an array of strings like the –Include parameter uses). Here is an example
of using –Filter to look for document files:
Get-ChildItem E:\Data -filter "*doc*"