PSWriteHTML
PSWriteHTML copied to clipboard
New-HTMLTableStyle for EmailTable
I am trying to change the header style of a table generated for an email. For example:
$Table = Get-ChildItem | Select-Object -First 5 -Property Name, Length, LastWriteTime
$Output = EmailBody {
New-HTMLTableStyle -Type Content -BackgroundColor red -TextColor white
EmailTable -Table $Table
}
Save-HTML -FilePath $PSScriptRoot\Test.html -ShowHTML -HTML $Output
But I don't see any style changes in the output. Since EmailTable is just an alias for New-HTMLTable, I thought that might work. Is that supposed to be supported?
EmailTable Styles are not supported yet. It's a good request, but a completely different CSS is required. I still need to revisit the styling of tables as currently that forces styles all over the place, and I would like to make it granular as well.