Welcome › Forums › General PowerShell Q&A › Newbie question
This topic contains 2 replies, has 2 voices, and was last updated by
I'm learning PS. If I execute:
Dir | Format-Table * | Out-Host performs as I expected. I get a big table with a lot of columns about files, which is what I expect.
And if I use:
Dir | Sort-Object Length | Select-Object Name, Length | ConvertTo-Html | Out-File report.htm
I get a table in HTM format as expected also.
BUT if I use:
Dir | Format-Table * | ConvertTo-Html | Out-File report.htm
I get a weird HTM file full of ClassIDs and seriously bad html table and none of the info I expected.
Any idea why?
See "The Big Book of PowerShell Gotchas." Common question. Format commands can't be piped to many others.
The topic ‘Newbie question’ is closed to new replies.