$name = "test" $name -eq "*est" # False $name -like "*est" # True # return name instead of boolean $name | ? {$_ -like "*est"} # test