I am trying filter by the name of each share using $Share.Name. However, when I try to use -contains in the if statement below, I get no r
$Share.Name
-contains
if
Bizarrely, .contains() acts like -contains on arrays:
$a = 'one','two','three' $a.contains('one') True $a.contains('o') False $a.contains OverloadDefinitions ------------------- bool IList.Contains(System.Object value)