If you add line breaks after the pipes your code would be easier to read.
The operator -contains looks for an element in an array of elements. And it has to be an exact match. So it will not work when you try to find a part of a given string. You can use the -match operator instead. Or - when you add asterisks in front and at the end of your GUID - you could use -like.