PowerShell Display Table In HTML Email

后端 未结 7 2323
春和景丽
春和景丽 2021-01-02 12:17

Ok, this may have been answered, but I\'m new and trying to learn, so I guess I\'m not \"getting\" it. I have a variable that contains a table of information (I got it from

相关标签:
7条回答
  • 2021-01-02 12:47

    I think this is a better solution (see ref 1)

    $DataSet.Tables[0] |select * -ExcludeProperty RowError, RowState, HasErrors, Name, Table, ItemArray | ConvertTo-Html 
    

    With the ExcludeProperty we can all exclude the noisy columns from our table without the need of specify specialy what columns we want it

    (1) http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/05/25/reinventing-the-wheel-automating-data-consistency-checks-with-powershell.aspx

    0 讨论(0)
提交回复
热议问题