Removes all elements from a list variable that match the contents of the specified collection, and returns true if the list changed as a result.
$[ScriptVariable]::removeAll(List c)
c (List): the collection of elements to compare.
The following example illustrates the syntax for the removeAll list method (using the $recipients list variable created in the add example):
$transfers = "Building 16"
$transfers::add("Winston Smythe")
$result = $recipients::removeAll($transfers)
print($result)
print($recipients)
true
['Engineering Group']['Building 14']
['Engineering Group’][’Building 14’]