-
Filterparameter is implemented by provider. It is efficient because applies when retrieving the objects.
Get-PSprovider commandlet shows providers that implement ‘filter’ parameter. For example, there are only two providers on my
system:ActiveDirectory and FileSystem -
Includeparameter is implemented by Powershell. It only works in conjunction withRecurseparameter (as MSDN describes here). -
It’s interesting that:
get-childitem -path Desktop\Extras\ -include *.txtreturns nothing
get-childitem -path Desktop\Extras\* -include *.txtreturns list of *.txt files
Maybe these are just nuances of the implementation.
Also see this excellent blog post: http://tfl09.blogspot.com/2012/02/get-childitem-and-theinclude-and-filter.html