Conditional PowerShell operators -
i trying list title not have temp
or temporary
or *contractor
or contractor*
.
this code working, meaning list not have temporary records.
$ptitle = $profile["title"] if ($ptitle -ne "temporary")
however following code not work when add -or
, -notlike
wildcard.
$ptitle = $profile["title"] if ($ptitle -ne "temporary" -or $ptitle -notlike "temporary" -or $ptitle -notlike "contractor" -or $ptitle -notlike "temp")
you want -and
here. expression evaluate false if of words found currently.
Comments
Post a Comment