Effective way to filter on multiple wildcards in PowerShell

Question:

I’d like to be able to do

but that syntax isn’t supported.

Answer:

Use -Include which takes an array, instead of -Filter. Note that you have to use * as the path when using -Include:

Source:

Effective way to filter on multiple wildcards in PowerShell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply