I gave an example of how to do this in a previous thread. Take a look here: ConvertTo-HTML Conditional Formatting