When you post code, error messages, sample data or console output format it as code, please.
In the “Text” view you can use the code tags “PRE”, in the “Visual” view you can use the format template “Preformatted”. You can go back edit your post and fix the formatting - you don’t have to create a new one.
Thanks in advance.
Please take a look at the cmdlet Where-Object. Please read the complete help including the examples to learn how to use it.
If you have problems with your code you should share this code here completely including the error messages you might get.