I have a bunch of functions in which I create PSObjects and add members to them with the add-member cmdlet. What I want to do is provide a custom name for the objects that I create. I tried overriding the GetType() function of the object but I really want to override properties and methods of what is returned from GetType() so that I can execute $myObject.GetType().Name and it returns the name that I assigned to my custom object. Is there an existing pattern out there to do this type of thin? I can't imagine that I'm the first one to desire this functionality yet I'm having no luck finding anything on this.
Thanks