Author Posts

April 20, 2016 at 9:55 am

In PowerShell 4 and below, absent the -Autoformat switch, Format-Table spreads out the columns across the console, with guesses about appropriate column widths based on just the first object in the pipeline.

In PowerShell 5, Format-Table without the -Autoformat switch uses -Autoformat -like formatting based on however many objects it get from the pipeline in the first 300 milliseconds.

With the -Autoformat switch, Format-Table waits until it has all of the items from the pipeline before making decisions on column widths.

Most of the time, the default PowerShell 5 behavior or the -Autoformat behavior works great. But on rare occasions, neither produces readable results, and the default PowerShell 4 behavior would be preferable.

Is there a way in PowerShell 5 to force Format-Table to behave like it did in PowerShell 4?

April 20, 2016 at 10:04 am

It's coded into the formatting system. Although you could obviously create custom views for your objects, which would become their default views rather than the generic behavior.