Going through a file I was trying to select lines that only contain "teamsites". I tried piping file through where-object { $_ -contains "teamsites"} and got nothing whether or not I used wildcard "*" before or after "*teamsites* or both. Using -like selected the lines I wanted, but I have gone through text and help files without seeing why.
To just further confuse myself I also tried $_.contains("teamsites"
and that just got syntax errors. Shouldn't that work?