powershell search array for exact match code example Example: powershell search array $a = @(1,2,3,4,5) $a | where { $_ -eq 3 } $a -eq 3 $a -contains 3