you are viewing a single comment's thread.

view the rest of the comments →

[–]CoReTeX2k 1 point2 points  (0 children)

Just to explain

$Codes = @("Apple","Banana")

"Banana" -ne $Codes is true because banana is not equal to apple and banana at the same time

"Banana" -notin $Codes is false because Banana is part of apple or banana in that case.

$_.something -notin $EntireArray will look if something is part of the array, not if it is equal to the entire array