Iframe component for PowerShell Universal pages.

Available in PowerShell Universal 2.5 or later.

Iframes provide the ability to nest another website within the page. The is especially useful if you wish to embed a dashboard within a page.

Embed a Dashboard in a Page

To embed a dashboard in a page, assume we have a dashboard that is defined such as this. This dashboard returns a table of services. It uses the -Blank parameter on New-UDPage to remove the header. This dashboard is configured with a base URL of /embed

New-UDDashboard -Title "Services" -Pages @(
    New-UDPage -Name 'Table' -Content {
        New-UDTable -Data (Get-Service)
    } -Blank

Add a new IFrame component to the page and within the properties of the page, set the URL to the base URL of the dashboard.

When the page loads, it will load the dashboard and display it within the page.


When you embed multiple dashboards within a page they will be treated an individual dashboards and will not communicate event handling code. This means that display toasts and modals will appear within the IFrame and not in the parent code.

Last updated