Format-Table
Use Format-Table to render objects as a table of columns for display.
Documentation: Microsoft Learn — Format-Table
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Format-Table [[-Property] <object[]>] [-AutoSize] [-Wrap] [-GroupBy <Object>] [-HideTableHeaders] [<CommonParameters>]- Stage 1Format-Table
-Property -AutoSize -Wrap -GroupBy -HideTableHeaders
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Select first 5
Show reference output
Sample output · fictional data, shaped like the real thing
Status Name DisplayName ------- -------- --------------------------------------- Running BITS Background Intelligent Transfer Service Running Dnscache DNS Client Stopped Spooler Print Spooler Running WinRM Windows Remote Management
Select first 6
Show reference output
Sample output · fictional data, shaped like the real thing
Name Id CPU(s) WS(MB) ------ ----- ------ ------ chrome 9184 842.31 464.0 Code 6620 512.08 325.8 pwsh 11268 18.27 75.0
Select first 3
Show reference output
Sample output · fictional data, shaped like the real thing
Status Name DisplayName ------- -------- --------------------------------------- Running BITS Background Intelligent Transfer Service Running Dnscache DNS Client Stopped Spooler Print Spooler
Parameters
Parameter definitions:
-Property-AutoSize-Wrap-GroupBy-HideTableHeaders
Practical use and troubleshooting
Practical scenario: Use Format-Table when you need to render objects as a table of columns for display. Review syntax and sample output, then try an example in the browser lab. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.
Common error and fix: Missing displayed columns can be a width issue rather than missing data. Select the required properties explicitly and inspect one object with Format-List before changing the source query. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.
See also: Format-List. Format-Table lays out columns; Format-List lays out properties vertically. Both create formatting instructions rather than the original objects needed by filtering and structured export. Read the linked command before substituting it; similar names do not imply identical inputs or output.
Recap
Format-Table Use Format-Table to render objects as a table of columns for display.
Next: Format-List