I need to match a content of a string against set of strings. I have something like this:
>$ID = "GEt"
>$ID -Match "Get|YES|NO"
True
I don't need -cmatch - that's alright. But the following - not:
>$ID = "targetService"
>$ID -Match "Get|YES|NO"
True
How do I avoid that, if the string I'm looking for is a substring of another?
"get","yes","no" -contains $ID