DanielD64,
Welcome back to the forum. … long time no see.
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
It might be better when you explain what your idea is instead of showing confusing code.
Where do you define $cluster_filter?
If you define a proper array with $filter = “'one”,“two” you don’t have to split it.
That’s usually unnecessary.
If you use a foreach() loop you define a loop variable you name yourself. You don’t have the default pipeline variable $_ in this case.
You use the same name for your loop variable like you did before for your array.
What do you expect from this line of code? If you run a comparison you get a $true or a $false. Is it really that what you want to collect in an array?
Where do you populate $AllClusters?
Please keep in mind that we cannot see your screen and we cannot read your mind. Take a step back and a deep breath and try to explain in simple terms what you want to achieve.