When it comes to formatting Format-Table and Format-List are the tools Nr. 1. But what about format-wide? The longer I am playing with it the better I like it. Format-Wide is cool!
Format-Wide formats objects as a wide table. Only one property is displayed.
Get-Process | Format-Wide
The parameter column determines the number of columns.
Get-Service | Format-Wide -Column 5
The next command displays all services beginning with letters R-S. Then the ouput is sorted and grouped by Status.
Get-Service [r-s]* | Sort-Object Status | Format-Wide -GroupBy Status
Have fun formatting your output!
Categories: PowerShell