How it works...
The default parameter for Select-Object, as we have seen, is Property. It accepts property names and shows their values in the output. This parameter can be used to fetch values of multiple properties (Name, Id, Threads).
However, some properties have more complex objects within them, as we saw in the case of the Threads property of the object returned by Get-Process. A simple way to identify complex objects is to see if they are enclosed in curly braces.
The ExpandProperty parameter accepts only a single property name as input and expands the property to show its objects. This can again be piped to Select-Object (or any other relevant cmdlet) for further processing.
In cases where the object is not complex, ExpandProperty ...
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