# New-HTMLPage

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

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

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

## Syntax

```
New-HTMLPage
[[-FilePath] <String>]
[[-ID] <String>]
[-Name] <String>
[[-PageContent] <ScriptBlock>]
[[-Title] <String>]
[<CommonParameters>]
```

[#](#method-new-htmlpage-string-string-string-scriptblock-string)

Parameter set: `All Parameter Sets`

## Description

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

### Example 1

```powershell
<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".

## Parameters

**-FilePath String optionalposition: 3**

The file path where the HTML page will be saved.

**-ID String optionalposition: 4**

The ID of the HTML page.

**-Name String requiredposition: 1**

The name of the HTML page.

**-PageContent ScriptBlock optionalposition: 0**

The script block containing the HTML content of the page.

**-Title String optionalposition: 2**

The title of the HTML page.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:062CBA77F956C51D10AEFC634FF26AD1E13491CC3065CE50256DD8871C5A528F -->
