Getting the column headings of a list of processes:
Get-Process | Select -First 2
The first two entries are listed and all headers are displayed on the top.
Using the Pipeline operator to format the output
Posh cmdlet used to format the output:
1. Format-table
If you want, you can get a customized list of only two headers:
Get-Process | Format-Table name, id

Notice that the output is screenwide (Posh uses the lenght of the screen to fit all the headers, in this case only 2, so the space between the two headers is wide)
However, you can use the Autosize parameter to widen the column to fit the longest record name, instead of using the default screenwide view:
Get-Process | Format-Table name, id -AutoSize | more
So, in this case “AppleMobileDeviceService” is the record with the longest width so the column length get autosized accordingly, in order to fit the longest record;
Get-Process | Format-Table name, id -GroupBy name -AutoSize
2. Format-List
Get-Process | where { $_.pm -gt 20mb } | Format-List * | more
This will list all processes using more than 20mb of memory; The ” * ” will show all items for this process
Get-Service | where { $_.status -EQ “running” } | format-List *
Get-Process | Format-List *Format-Wide
3. Format-Wide
Get-Process | Format-Wide name
Get-Process | Format-Wide name -Column 6
Note that all processes are listed in 6 columns; the default number of columns is 2 (two)
Get-Process | Format-Wide name -Auto-Size


