Format-Table (ft) displays PowerShell objects as tables. Choose properties, use wildcards, rename columns, group sorted results, or wrap truncated values. section 11.3
Useful formatting patterns include:
- Select columns with `Format-Table Name,ID,Responding`; use `-Property *` or wildcard patterns to request broader sets of properties. section 11.11 section 11.3
- Add `-Wrap` when long values are truncated, preserving information by making the table taller. section 11.3
- Use `-GroupBy` after sorting on the same property to create grouped sections, such as running and deallocated Azure virtual machines. section 11.3
Create a readable calculated column
Convert process virtual memory from bytes to whole megabytes with `Get-Process | Format-Table Name,@{name='VM(MB)';expression={$_.VM / 1MB -as [int]}}`. A hash-table expression supplies the column name and calculation. section 11.6
Put Format-Table at the end of a pipeline, or immediately before Out-File. It emits formatting instructions rather than the original objects, so later object-processing cmdlets receive the wrong input. section 11.9.1
