# New-HTMLWinBox

Creates a customizable HTML window box with various options for styling and functionality.

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 customizable HTML window box with various options for styling and functionality.

## Syntax

```
New-HTMLWinBox
[[-BackgroundColor] <String>]
[[-Border] <String>]
[[-Bottom] <String>]
[[-Height] <String>]
[[-HTML] <ScriptBlock>]
[[-Index] <Nullable`1>]
[[-Left] <String>]
[-Maximize]
[-Modal]
[-NoAnimation]
[-NoCloseIcon]
[-NoFullScreenIcon]
[-NoHeader]
[-NoMaximizeIcon]
[-NoMinmizeIcon]
[-NoMoveCapability]
[-NoResizeCapability]
[-NoShadow]
[[-Right] <String>]
[[-Theme] <modern|white>]
[[-Title] <String>]
[[-Top] <String>]
[[-Url] <Uri>]
[[-Width] <String>]
[[-X] <String>]
[[-Y] <String>]
[<CommonParameters>]
```

[#](#member-48c396950d373cd12dd03efa)

Parameter set: `All Parameter Sets`

## Description

This function allows you to create an HTML window box with customizable features such as title, background color, initial position, size, URL content, modal display, theme, and more.

## Examples

### Example 1

```powershell
$Data = Get-Process | Select-Object -First 3
```

New-HTML -TitleText 'This is a test' -FilePath "$PSScriptRoot\Example-WinBox01.html" { New-HTMLWinBox -Title 'This is a test Window' -BackgroundColor Red { New-HTMLText -Text 'This is a text within modal dialog' New-HTMLTable -DataTable $Data } -Width 50% -Height 50% -X center -Y center } -Online -ShowHTML

## Parameters

**-BackgroundColor String optionalposition: 2**

Specifies the background color of the window box title.

**-Border String optionalposition: 4**

Set the border width of the window (supports all css units, like px, %, em, rem, vh, vmax).

**-Bottom String optionalposition: 11**

Set or limit the viewport of the window's available area (supports units "px" and "%").

**-Height String optionalposition: 5**

Set the initial width/height of the window (supports units "px" and "%").

**-HTML ScriptBlock optionalposition: 0**

Specifies the HTML content to be displayed within the window box.

**-Index Nullable<T> optionalposition: 3**

Set the initial z-index of the window to this value (could be increased automatically when unfocused/focused).

**-Left String optionalposition: 12**

Set or limit the viewport of the window's available area (supports units "px" and "%").

**-Maximize SwitchParameter optional**

Automatically maximizes the window box when created.

**-Modal SwitchParameter optional**

Indicates whether the window box should be displayed as a modal window.

**-NoAnimation SwitchParameter optional**

Disables transition animations for the window box.

**-NoCloseIcon SwitchParameter optional**

Hides the close icon in the window box.

**-NoFullScreenIcon SwitchParameter optional**

Hides the fullscreen icon in the window box.

**-NoHeader SwitchParameter optional**

Hides the header of the window box, including the title and toolbar.

**-NoMaximizeIcon SwitchParameter optional**

Hides the maximize icon in the window box.

**-NoMinmizeIcon SwitchParameter optional**

Hides the minimize icon in the window box.

**-NoMoveCapability SwitchParameter optional**

Disables the moving capability of the window box.

**-NoResizeCapability SwitchParameter optional**

Disables the resizing capability of the window box.

**-NoShadow SwitchParameter optional**

Disables the drop shadow effect for the window box.

**-Right String optionalposition: 10**

Set or limit the viewport of the window's available area (supports units "px" and "%").

**-Theme String optionalposition: 14**

Specifies the theme of the window box.

Possible values: `modern`, `white`

**-Title String optionalposition: 1**

Specifies the title of the window box.

**-Top String optionalposition: 9**

Set or limit the viewport of the window's available area (supports units "px" and "%").

**-Url Uri optionalposition: 13aliases: Uri**

Specifies the URL content to be loaded inside the window box via iframe.

**-Width String optionalposition: 6**

Set the initial width/height of the window (supports units "px" and "%").

**-X String optionalposition: 7**

Set the initial position of the window (supports: "right" for x-axis, "bottom" for y-axis, "center" for both, units "px" and "%" for both).

**-Y String optionalposition: 8**

Set the initial position of the window (supports: "right" for x-axis, "bottom" for y-axis, "center" for both, units "px" and "%" for both).

## 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:D6619D0D10FCA7CDF638404F265B8E1E1AB9544F20B03622D2629700F1C4B725 -->
