Gather some objects which have view definitions registered with the alternate formatting engine.
Attempt to Format-Blah them, explicitly requesting certain properties ("$stuff | ft Name, DumpPath")
Expected results:
Something sensible. Ideally we can just generate an alt-formatting view definition on the fly and use that.
Actual results:
The already-registered view definition is used, ignoring the request for certain properties.
Concrete example:
$stuff = dir C:\temp\dumps\ -File | ForEach-DbgDumpFile {
$thing = lm ntdll
$thing | Format-List | Out-Null
Write-Output $thing
}
# BUG: We get the default module table view here, not Name and DumpPath
$stuff | ft Name, DumpPath
Workarounds:
To get the desired properties with the alternate formatting engine, use the alternate formatting cmdlets directly (like "$stuff | fat Name, DumpPath").
To use the standard formatting engine, use the module-qualified name of the formatting cmdlets (like "$stuff | Microsoft.PowerShell.Utility\Format-Table Name, DumpPath").
Repro Steps: (abstract)
$stuff | ft Name, DumpPath
")Expected results: Something sensible. Ideally we can just generate an alt-formatting view definition on the fly and use that.
Actual results: The already-registered view definition is used, ignoring the request for certain properties.
Concrete example:
Workarounds: To get the desired properties with the alternate formatting engine, use the alternate formatting cmdlets directly (like "
$stuff | fat Name, DumpPath
").To use the standard formatting engine, use the module-qualified name of the formatting cmdlets (like "
$stuff | Microsoft.PowerShell.Utility\Format-Table Name, DumpPath
").