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-HTMLWinBox

Namespace PSWriteHTML

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

Remarks

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

Authored help example

EXAMPLE 1


$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

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-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>]
#
Parameter set: All Parameter Sets

Parameters

BackgroundColor String optionalposition: 2pipeline: False
Specifies the background color of the window box title.
Border String optionalposition: 4pipeline: False
Set the border width of the window (supports all css units, like px, %, em, rem, vh, vmax).
Bottom String optionalposition: 11pipeline: False
Set or limit the viewport of the window's available area (supports units "px" and "%").
Height String optionalposition: 5pipeline: False
Set the initial width/height of the window (supports units "px" and "%").
HTML ScriptBlock optionalposition: 0pipeline: False
Specifies the HTML content to be displayed within the window box.
Index Nullable`1 optionalposition: 3pipeline: False
Set the initial z-index of the window to this value (could be increased automatically when unfocused/focused).
Left String optionalposition: 12pipeline: False
Set or limit the viewport of the window's available area (supports units "px" and "%").
Maximize SwitchParameter optionalposition: namedpipeline: False
Automatically maximizes the window box when created.
Modal SwitchParameter optionalposition: namedpipeline: False
Indicates whether the window box should be displayed as a modal window.
NoAnimation SwitchParameter optionalposition: namedpipeline: False
Disables transition animations for the window box.
NoCloseIcon SwitchParameter optionalposition: namedpipeline: False
Hides the close icon in the window box.
NoFullScreenIcon SwitchParameter optionalposition: namedpipeline: False
Hides the fullscreen icon in the window box.
NoHeader SwitchParameter optionalposition: namedpipeline: False
Hides the header of the window box, including the title and toolbar.
NoMaximizeIcon SwitchParameter optionalposition: namedpipeline: False
Hides the maximize icon in the window box.
NoMinmizeIcon SwitchParameter optionalposition: namedpipeline: False
Hides the minimize icon in the window box.
NoMoveCapability SwitchParameter optionalposition: namedpipeline: False
Disables the moving capability of the window box.
NoResizeCapability SwitchParameter optionalposition: namedpipeline: False
Disables the resizing capability of the window box.
NoShadow SwitchParameter optionalposition: namedpipeline: False
Disables the drop shadow effect for the window box.
Right String optionalposition: 10pipeline: False
Set or limit the viewport of the window's available area (supports units "px" and "%").
Theme String optionalposition: 14pipeline: Falsevalues: 2
Specifies the theme of the window box.
Possible values: modern, white
Title String optionalposition: 1pipeline: False
Specifies the title of the window box.
Top String optionalposition: 9pipeline: False
Set or limit the viewport of the window's available area (supports units "px" and "%").
Url Uri optionalposition: 13pipeline: Falsealiases: Uri
Specifies the URL content to be loaded inside the window box via iframe.
Width String optionalposition: 6pipeline: False
Set the initial width/height of the window (supports units "px" and "%").
X String optionalposition: 7pipeline: False
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: 8pipeline: False
Set the initial position of the window (supports: "right" for x-axis, "bottom" for y-axis, "center" for both, units "px" and "%" for both).