-contains / -notcontains are collection operators: they test if the LHS object is equal in full to at least one element of the RHS collection. They are not to be confused with the .Contains() .NET method for substring matching. While PowerShell has no equivalent operator for literal substring matching, you can use -like with wildcard expressions or -match with regular expressions, both of which are case-insensitive by default.
git branch? the-containsoperator is quite literal when it comes to its name, just means"test" is being searched in an array.-contains/-notcontainsare collection operators: they test if the LHS object is equal in full to at least one element of the RHS collection. They are not to be confused with the.Contains().NET method for substring matching. While PowerShell has no equivalent operator for literal substring matching, you can use-likewith wildcard expressions or-matchwith regular expressions, both of which are case-insensitive by default.