@ninMonkey, yes, that is
the semantic PowerShell way to do this. Note that it is similar to
-contains
or
-notcontains
except that it does a
literal (not)match. Besides, it also uses the pipeline for output which is by fact PowerShell's nature but often dismissed (and under estimated) by C# programmers as "
not sophisticated". Arrays are mutual, which means you have to translated it into e.g. a
ArrayList
where you create an extra step and lose performance and the easy PowerShell syntax (unless you can combine this with another part of the solution). —
iRon 11 secs ago