If I run the following command in PowerShell, it will return to me an object with the sum of the WorkingSet property:
PS > get-process chrome | measure-ob
Another way:
(get-process chrome | measure-object WorkingSet -sum).sum
Yes, use Select-Object:
Get-Process chrome | Measure-Object WorkingSet -sum | Select-Object -expand Sum
Select-Object is used when one needs only some properties from the original object. It creates a new object and copies the desired properties to the new one.
Get-Process | Select-Object -property ProcessName, Handles
In case you need to extract the value (from one property), you use parameter -expandProperty instead of -property:
Get-Process | Select-Object -expand ProcessName
Note that you can compute the returned value:
get-process | Select-Object -property @{Name='descr'; Expression={"{0} - {1}" -f $_.ProcessName, $_.Handles }}
Just use parentheses to enclose the piped command:
(get-process chrome | measure-object WorkingSet -sum).sum
As a rule, PowerShell treats anything enclosed in parentheses as an object that you can reference by properties/methods.