I would like to be able to define and use a custom type in some of my PowerShell scripts. For example, let\'s pretend I had a need for an object that had the following struc
Surprised no one mentioned this simple option (vs 3 or later) for creating custom objects:
[PSCustomObject]@{ First = $First Last = $Last Phone = $Phone }
The type will be PSCustomObject, not an actual custom type though. But it is probably the easiest way to create a custom object.