Well, one solution would be to pipe your HTML to Out-String, then run a RegEx replace on that string to convert ><td>&lt;img href="greystate\0-5.png" alt="5-15 Days"&gt;</td><
back into ><td><img href="greystate\0-5.png" alt="5-15 Days"></td><
$Results = $working | Select-Object * -exclude Triage | convertTo-HTML -as Table -Title "Grey State Report - $surveydate" -body "<H4>The Following systems are currently not reporting to SCOM as of $surveydate :</H4></P>" -post "</p> This report generated by PowerShell, run on $runfrom by $runby." | Out-String
$Results -replace "(&lt;)(img href=)(")(.+?)(")( alt=)(")(.*?)(")(&gt;)", '<$2"$4"$6"$8">' > $ResultsHTML
That should fix anything so far as your image tags go. You may need to indicate a -width
on the Out-String
if your lines of HTML coding are extremely wide.