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

Example19

Source-owned example maintained with PSWriteHTML.

Import-Module .\PSWriteHTML.psd1 -Force

$Test1 = [PSCustomobject] @{
    'First column' = 'Test'
    'Second column' = '<br>MyIdol<br><strong>Test</strong>'
    'Example' = "`r`nTesting how PowerShell NewLines are treated $([Environment]::NewLine) Or how HTML tags are treated<br> Get it?"
}

New-HTML -TitleText 'My title' -Online -FilePath $PSScriptRoot\Example19.html -Verbose {
    New-HTMLSection -HeaderText 'Showing how tags are invoked. So BR and other tags like A HREF should be converted' {
        New-HTMLTable -DataTable $Test1 -PagingOptions @(50, 100, 150, 200) -Filtering -FilteringLocation Bottom -InvokeHTMLTags
    }
    New-HTMLSection -HeaderText 'Showing how PowerShell new lines such us `r`n and [Environment]::NewLine are changed into new lines in HTML' {
        New-HTMLTable -DataTable $Test1 -PagingOptions @(50, 100, 150, 200) -Filtering -FilteringLocation Bottom
    }
    New-HTMLSection -HeaderText 'Showing Same data but with Disable PowerShell NewLine' {
        New-HTMLTable -DataTable $Test1 -PagingOptions @(50, 100, 150, 200) -Filtering -FilteringLocation Bottom -DisableNewLine
    }
    New-HTMLSection -HeaderText 'Showing Same data but with Disable PowerShell NewLine but with InvokeHTMLTags' {
        New-HTMLTable -DataTable $Test1 -PagingOptions @(50, 100, 150, 200) -Filtering -FilteringLocation Bottom -DisableNewLine -InvokeHTMLTags
    }

} -ShowHTML