How to instantiate an object and set member fields with PowerShell?
问题 I'm trying to work out how to create objects, set fields for that object, and then add the object to a collection. Specifically, how can I create a $newPerson where the Name field is "joe" and with an array consisting of "phone1, phone2, phone3"? Similarly, "sue" has an array of "cell4 etc" and "alice" with her attributes, and so on. Ultimately, to put these three objects into an array of objects, $collectionOfPeople ? output: thufir@dur:~/flwor/csv$ thufir@dur:~/flwor/csv$ pwsh import.ps1