This is more for my own learning then anything. I'm finding that Get-WMIObject with a -query is faster then passing the whole Get-WMIObject through the pipe and using | Select-Object on it.
But I'm having a bit of trouble then working with the results.
My issue is, – this is just some example code. I'm actually querying for specific fields but it still brings back all the "__Name" fields. So trying to do the Select after to pass less across the pipe.
My assumption is that you are trying to exclude the double underscore properties, which are default properties for WMI. Check out this blog that explains what they are and how to get only what you want.
The -Query is faster because you are only returning those specific properties. You can replicate this by using -Properties: