Returns the first index position of a specified element within a list, or -1 if the list does not contain the specified element.
$[ScriptVariable]::indexOf(String str)
str (String): the list element to search for within the list.
The following example illustrates the syntax for the indexOf list method:
$recipients = "Engineering Group"
$recipients::add("Building 14")
$recipients::add("Winston Smythe")
$position = $recipients::indexOf("Winston Smythe")
print($position)
2