If I have a list of people with a "Name" property that's a string I can filter with
$People | ? Name -Match "Smith"
But there doesn't seem to be a similarly way to filter a plan list of strings. I have to write a more complex syntax like
Names | ? {$_ -Match "Smith"}
Is there a simpler syntax? It's something I have to do regularly, and I always wonder if there's something I'm missing.
Note: I've simplified a bit far here - I want it to work when it's consuming the output from a function, not just an array.