Project

PSWriteHTML

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

Stars 1,019
Forks 115
Open issues 54
PowerShell Gallery downloads 7,576,901
Release v1.41.0
Language: PowerShell Updated: 2026-10-03
Command

New-HTMLFrame

Module PSWriteHTML

Allows to inline other HTML files into the current HTML file.

Syntax

New-HTMLFrame [-EnableLogging] [[-FrameBorder] <Object>] [[-Height] <Object>] [[-Id] <String>] [[-Name] <String>] [[-Scrolling] <No|Yes|Auto>] [[-SourcePath] <String>] [-UseiFrameResizer] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Description

Allows to inline other HTML files into the current HTML file. This can be useful if we want to display content from another file.

Examples

Authored help example

EXAMPLE 1

New-HTML {
    New-HTMLSection {
        New-HTMLFrame -SourcePath "$PSSCriptRoot\GPOZaurr.html" -Scrolling Auto
    } -HeaderText 'Test'
    New-HTMLSection {
        New-HTMLFrame -SourcePath "$PSSCriptRoot\GPOZaurr.html" -Scrolling Auto -Height 1500px
    } -HeaderText 'Test'
    New-HTMLSection {
        New-HTMLFrame -SourcePath "C:\Support\GitHub\PSWriteHTML\Examples\Example-Maps\Example-Maps.html"
    } -HeaderText 'Test' -Height 100vh
} -Online -TitleText 'Test Inline' -ShowHTML -FilePath "$PSScriptRoot\Example-InlineHTML01.html" -AddComment

Parameters

-EnableLogging SwitchParameter optional
Enable logging to Console for debugging purposes when using iFrameResizer (requires UseiFrameResizer).
-FrameBorder Object optionalposition: 5
Set the frameborder attribute of the <iframe> element. This attribute specifies whether the frame should have a border. The default value is 0.
-Height Object optionalposition: 4
Set the height of the iFrame to static value. This should be used when not using iFrameResizer.
-Id String optionalposition: 0
ID of the HTML element. By default it's auto-generated.
-Name String optionalposition: 1
Name of the HTML element. By default it's empty.
-Scrolling String optionalposition: 3
The HTML <iframe> scrolling Attribute is used to specify that whether the scrollbar will be displayed or not in the <Iframe> Element. Basically the scrollbar is used when the content is large than the Iframe Element. Available options are: - auto: It has a default value. The scrollbar appears when needed. - yes: This value shows the scrollbar in the Iframe Element. - no: This value does not show the scrollbar in the Iframe Element.
Possible values: No, Yes, Auto
-SourcePath String optionalposition: 2
Path to a file with HTML file to display within iFrame
-UseiFrameResizer SwitchParameter optional
Forces HTML inline feature to use iFrameResizer instead of native functionality. For fully functional feature it requires modifying the source HTML file.

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.