Evotec

Project

PSWriteHTML

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

Stars 995
Forks 114
Open issues 69
PowerShell Gallery downloads 7,436,513
Release v1.41.0
Language: PowerShell Updated: 2026-04-11

API Reference

Function

New-HTMLPage

Namespace PSWriteHTML

Creates a new HTML page with specified content, name, title, file path, and ID.

Remarks

This function creates a new HTML page with the provided content and metadata. It generates a unique GUID for the page and stores it in the global schema. The function returns a custom object representing the page.

Examples

Authored help example

EXAMPLE 1


<body><h1>Hello, World!</h1></body></html>" } -Name "index" -Title "Welcome Page" -FilePath "C:\Pages\index.html" -ID "12345"
        

Creates a new HTML page with a simple "Hello, World!" content, named "index", titled "Welcome Page", saved at "C:\Pages\index.html", and with ID "12345".

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

New-HTMLPage [-FilePath <String>] [-ID <String>] -Name <String> [-PageContent <ScriptBlock>] [-Title <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

FilePath String optionalposition: 3pipeline: False
The file path where the HTML page will be saved.
ID String optionalposition: 4pipeline: False
The ID of the HTML page.
Name String requiredposition: 1pipeline: False
The name of the HTML page.
PageContent ScriptBlock optionalposition: 0pipeline: False
The script block containing the HTML content of the page.
Title String optionalposition: 2pipeline: False
The title of the HTML page.