Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

-or Returning a false positive ??

$
0
0

Hi Guys,

Can someone tell me why I get $TRUE with this?

$foo = @('A','B','C')
 
if ($foo -Contains 'X') {Write-Output $foo}
 
 
if ($foo -Contains 'X' -or 'Z') {Write-Output $foo}
A
B
C

Thanks


Viewing all articles
Browse latest Browse all 13067

Trending Articles