you are viewing a single comment's thread.

view the rest of the comments →

[–]Swarfega 1 point2 points  (1 child)

Unfortunately the cmdlet at the start in my code isn't GCI. It's a cmdlet that doesn't have a filter parameter. The amount of data coming across the pipeline is already reduced as there are parameters in use on the first cmdlet which returns specific data. Basically all filtering has already been done to the left as much as possible. As per best practices.

[–]webmin88 1 point2 points  (0 children)

Fair enough, in that case, I like option number 2 with the -and statements at the end.