In V2, this does not get easier, but there is an extension mechanism that you may not be aware of.
I believe that part of the problem is related to the processing of PowerShell (or lack of) generic data.
In addition, typed collections must be introduced to use extension methods, which is difficult in PowerShell. PowerShell, as a dynamic language, supports the collection of collections of various types, and most collections are represented as arrays of Object. Extension methods require that the parameters be inferred from the type of the collection, and then it is verified that the predicate is of the correct type.
If your problem is related to some functions like LINQ, there are several cmdlets that provide the same functionality when working with collections of objects.
The extended PowerShell type system allows you to add methods to various types by adding an xml file or modifying an existing one (creating a new one is the recommended way). Jeffrey Sverver demonstrates this by adding ScriptProperty to the Object class in this blog post .
This is not exactly the same, but it can do the job.
Steven murawski
source share