Summary: Learn about the easiest way to create a custom Windows PowerShell object.
How can I easily create a custom object that contains only a few of the existing properties of a
Windows PowerShell cmdlet?
Use the Select-Object cmdlet in the pipeline and choose the properties you want to add to the object:
Get-Process | Select-Object name, id