Export to HTML from Win7 PowerShell v2 I am trying to run several checks on different settings and print them out in an easy to read format. I'm using Win7 PowerShell V2 I pulled all this from a website and it works when I have tables:
$a = "<style>"
$a = $a + "BODY{background-color:peachpuff;}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:thistle}"
$a = $a + "TD{border-width: 1px;padding: 0px;border-style: solid;border-color: black;background-color:palegoldenrod}"
$a = $a + "</style>"
$Variable
$VariableHTML = ConvertTo-HTML -head $a -body "<H2>Title I want</H2>"
$VariableHTML > C:\PoSH\My_Exported_HTML.html
My main issue is my $variable is no longer a table. It is one word Pass/Fail. I would like to have a title on one line, definition on the second line, and the result smaller and on the third line.