PowerShell - Working with Objects
You have an object
$obj with a property Values as an array. You want to add a ScriptMethod SumValues that returns the sum of all elements in Values. Which code correctly implements this?