PowerShell: Format-Table to show all columns/members
Posted by jpluimers on 2019/07/18
I’m not even sure if I’ve posted this before, but I always forget how to show all members (or columns) using Format-Table.
It’s dead easy: -Property *
Get-ChildItem | Format-Table -Property *
Later I found out this is equivalent with the shorter version where you omit the -Property part which I wrote about in [WayBack] PowerShell: when Format-Table -AutoSize displays only 10 columns and uses the width of the console when redirecting to file.
So you can shorten the above to:
Get-ChildItem | Format-Table *
It has way more columns than this:
Get-ChildItem | Format-Table
The extra members in both marked with *:
PSPathPSParentPathPSChildNamePSDrivePSProviderPSIsContainerBaseNameMode*Name*FullNameParentExistsRootExtensionCreationTimeCreationTimeUtcLastAccessTimeLastAccessTimeUtcLastWriteTime*LastWriteTimeUtcAttributes
The odd thing: one property fails in the -Property * table:
Length
I tracked this down to how -Property * works: it takes the first entry in the list. If that is not a file, then it has no Length property: [WayBack] powershell – Measure-Object : The property “length” cannot be found in the input for any objects – Stack Overflow.
Note that for a GUI version, you can replace Format-Table with Out-GridView. See






Leave a comment