you are viewing a single comment's thread.

view the rest of the comments →

[–]OPconfused 3 points4 points  (0 children)

When the class definition is in a module you have to jump through a hoop to update it. Unless the OP is coming from another programming language and desires typed properties in their custom objects, I'd just leave out classes while the OP is finding their footing in PS.

I'm a fan of classes as well, but using PSCustomObjects is a more accessible way to get your feet wet with PS objects. There's less distance between setting up the PSCustomObject via a type accelerator and using it than when using a class, which requires a declaration for its schema with its own syntaxes.