This function should return a total: inside it I create $list = New-Object System.Collections.ArrayList, call $list.Add(5) and $list.Add(7), print a progress message, and finish with return 12. The caller does $total = Get-Total and gets an array containing 0, 1 and 12 instead of just 12.
Where do the 0 and 1 come from, and how do I make a function return exactly one value?




