Just published a great script to generate a fully colored and formatted HTML-table output from an input PSObject.
Sometimes needed a colored report e.g. disk storage space, CPU or memory usage to warning and/or critical issues.
There are some examples here:
Get-Process | ConvertTo-HtmlTable -Property WS -Warning 1724416 -Critical 2007040 | Out-File test.html
$PSObject = Get-Process ConvertTo-HtmlTable -PSObject $PSObject -Property WS -Warning 1724416 -Critical 2007040 | Out-File test.html
Get-Process | Sort-Object -Property WS -Descending | ConvertTo-HtmlTable -Property WS -Warning 1724416 -Critical 2007040 | Out-File test.html
More formatted Html-Table:
Get-Process | Select Name, Id, PM, VM, WS | ConvertTo-HtmlTable -Property WS -Warning 8712192 -Critical 12984320 -Title "WS Report" -BorderStyle double -HeaderBackgroundColor grey -BackgroundColor lightgrey -Padding 10px | Out-File test.html