How it works...
In this recipe, we created a custom object ($CustomProcess) from an output object ($Process). The properties within $Process can be accessed using the member access operator. Values from $Process are treated as values for the properties in $CustomObject, however, the names in $CustomObject are different. In this recipe, we also used a calculated property, RunningMins.
An important point to note here is that the outcome of this recipe can also be achieved using calculated properties, along with Select-Object. However, in situations where object versatility is important and the number of instances of the objects is significantly larger, it is simpler to use a custom object. We will extend this capability in future chapters, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access