diff --git a/PwshSpectreConsole/public/formatting/Format-SpectreTable.ps1 b/PwshSpectreConsole/public/formatting/Format-SpectreTable.ps1 index 4dc9f63..e9a56f8 100644 --- a/PwshSpectreConsole/public/formatting/Format-SpectreTable.ps1 +++ b/PwshSpectreConsole/public/formatting/Format-SpectreTable.ps1 @@ -153,6 +153,9 @@ function Format-SpectreTable { 'View' { $FormatTableParams.View = $View } 'Property' { $FormatTableParams.Property = $Property } } + if ($Property.Count -eq 0) { + $FormatTableParams.Property = '*' + } } process { foreach ($entry in $data) { @@ -178,9 +181,9 @@ function Format-SpectreTable { } if ($FormatTableParams.Keys.Count -gt 0) { Write-Debug "Using Format-Table with parameters: $($FormatTableParams.Keys -join ', ')" - $collector = $collector | Format-Table @FormatTableParams * + $collector = $collector | Format-Table @FormatTableParams } else { - $collector = $collector | Format-Table * + $collector = $collector | Format-Table -Property * } if (-Not $collector.shapeInfo) { # scalar array, no header