Extra Columns in HTML Output From SQLcmd This topic contains 3 replies, has 3 voices, and was last updated by Warren Frame 1 year, 10 months ago. Author Posts August 26, 2015 at 11:57 am #29022 YulParticipant Hi, I'm getting extra columns when trying to output an SQL query to HTML. I get RowError, RowState, Table, ItemArray & HasErrors along with with my actual query results. These looks like property values attached to the object created by Invoke-Sqlcmd. PS C:\> $myTable | ConvertTo-Html -as TABLE | Out-File C:\Test.htm PS C:\> Invoke-Expression C:\Test.htm Any ideas how I can strip those out? Thanks, August 26, 2015 at 12:15 pm #29024 Don JonesKeymaster By default, ConvertTo-HTML converts ALL properties you give it into columns. Just use its -Prop parameter to specify the properties you want. August 26, 2015 at 12:21 pm #29026 YulParticipant Ahh, so simple... Thank you very much! August 26, 2015 at 3:06 pm #29030 Warren FrameParticipant Hi! In case you use it elsewhere, just an FYI: Invoke-Expression is a bit risky, and can expose you to code injection. Invoke-Item would work in this example. Cheers! Author Posts You must be logged in to reply to this topic.