Formatting Output
<Pipeline> | <Formatting Command>
When objects reach the end of the output pipeline, PowerShell converts them to text to make them suitable for human consumption. PowerShell supports several options to help you control this formatting process:
PowerShell formatting commands | |
---|---|
Formatting Command | Result |
| Formats the properties of the input objects as a table, including only the object properties you specify. If you do not specify a property list, PowerShell picks a default set. In addition to supplying object properties, you may also provide advanced formatting statements: PS > Get-Process | ` Format-Table -Auto Name,` @{Label="HexId"; Expression={ "{0:x}" -f $_.Id} Width=4 Align="Right" } The advanced formatting
statement is a hashtable with the keys, For more information about the |
| Formats the properties of the input objects as a list, including only the object properties you specify. If you do not specify a property list, PowerShell picks a default set. The The
The command, |
Get Windows PowerShell Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.