Project

PSWriteHTML

PSWriteHTML is an open-source PowerShell project with packages, release history, and working documentation.

Stars1015
Forks112
Open issues54
PowerShell Gallery downloads7576901
Releasev1.41.0
Language: PowerShell Updated: 2026-08-10T20:00:10.0000000+00:00

Curated Examples

Example Emailbodytable

Source-owned example maintained with PSWriteHTML.

Import-Module .\PSWriteHTML.psd1 -Force

$Table = @(
    [PSCustomObject] @{
        Name         = 'Process1'
        BasePriority = 1
        Company      = 'Company1'
        CompanyName  = 'Company Name 1', "Teest"
    }
    [PSCustomObject] @{
        Name         = 'Process1'
        BasePriority = 1
        Company      = 'Company1'
        CompanyName  = @('Company Name 1', "Teest")
    }
    [PSCustomObject] @{
        Name         = 'Process1'
        BasePriority = 1
        Company      = 'Company1'
        CompanyName  = "Teest"
    }
)

$Output = EmailBody -FontSize 15px -FontFamily 'Tahoma' {
    EmailTableOption -PrettifyObject -PrettifyObjectSeparator " - "
    EmailText -Text 'This should be font 8pt, table should also be font 8pt'
    EmailTable -Table $Table # this will use PrettifyObject from above

    EmailText -LineBreak

    EmailTable -Table $Table -PrettifyObject -PrettifyObjectSeparator ", "

    EmailText -LineBreak

    EmailTextBox -FontFamily 'Calibri' -Size 17 -TextDecoration underline -Color DarkSalmon -Alignment center {
        'Demonstration'
    }
    EmailText -LineBreak
}

Save-HTML -ShowHTML -HTML $Output