I often come across a situation where I need an extra property in the object, and I understand one of the ways to create a note property is to use select-object, rather than add-member, or pscustomobject. My problem is I keep getting an error when I try to set that property, that the property doesn't exist or cannot be set, so clearly I am getting something basic wrong.
For example, I would like to include the path to an acl object access export, but keep getting an error:
I can use custom object to achieve that, but I was hoping to save myself some time writing out hash tables by instead using select-object to define the custom property . Do I need to use new-object?
Open in new window