I need to filter 30 types of file from 2T of data, i want to set a variable for get-childitem then pass to -filter for different type of files, but it doesn't work.....any idea why? The idea was if I use get-childitem 30 times it will slow down the system, so I only want to do it once and set the output as a variable and use it for filtering different types of files.
$a = Get-ChildItem -Recurse c:\work
$a -filter .prt | .............
Any suggestion please!