Robert Cain builds on a prior post:
In the previous installment of this series, I covered the various ways to create objects using the
PSCustomObject
. We saw how to create it using theNew-Object
cmdlet, then how to add your custom properties to it using theAdd-Member
cmdlet.In this post we’ll learn how to add our own methods to our objects using script blocks. Before we go on, just a quick reminder on vocabulary.
Click through for that reminder, as well as implementation details.