New-UDDashboard
Synopsis
Creates a new dashboard.
Syntax
New-UDDashboard [-Title <String>] [-Pages <DashboardPage[]>] [-Theme <Hashtable>] [-Scripts <String[]>] [-Stylesheets <String[]>] [-Logo <String>] [-DefaultTheme <String>] [-DisableThemeToggle] [-HeaderPosition <String>] [-HeaderColor <DashboardColor>] [-HeaderBackgroundColor <DashboardColor>] [-NavigationLayout <String>] [-Navigation <Hashtable[]>] [-HideUserName] [-HideNavigation] [-LoadNavigation <Endpoint>] [-HeaderContent <Endpoint>] [-PageNotFound <Endpoint>] [-NotAuthorized <Endpoint>] [-SessionTimeoutModal <ScriptBlock>] [-Menu <Endpoint>] [<CommonParameters>]
New-UDDashboard [-Title <String>] -Content <Endpoint> [-Theme <Hashtable>] [-Scripts <String[]>] [-Stylesheets <String[]>] [-Logo <String>] [-DefaultTheme <String>] [-DisableThemeToggle] [-HeaderPosition <String>] [-HeaderColor <DashboardColor>] [-HeaderBackgroundColor <DashboardColor>] [-NavigationLayout <String>] [-Navigation <Hashtable[]>] [-HideUserName] [-HideNavigation] [-LoadNavigation <Endpoint>] [-HeaderContent <Endpoint>] [-PageNotFound <Endpoint>] [-NotAuthorized <Endpoint>] [-SessionTimeoutModal <ScriptBlock>] [-Menu <Endpoint>] [<CommonParameters>]Description
Creates a new dashboard. This component is the root element for all dashboards. You can define content, pages, themes and more.
Parameters
-Title
The title of the dashboard.
Required? false
Position? named
Default value PowerShell Universal
Accept pipeline input? false
Aliases
Accept wildcard characters? false-Content
The content for this dashboard. When using content, it creates a dashboard with a single page.
-Pages <DashboardPage[]>
Pages for this dashboard. Use New-UDPage to define a page and pass an array of pages to this parameter.
-Theme
The theme for this dashboard. You can define a theme with New-UDTheme.
-Scripts <String[]>
JavaScript files to run when this dashboard is loaded. These JavaScript files can be absolute and hosted in a third-party CDN or you can host them yourself with New-PSUPublishedFolder.
-Stylesheets <String[]>
CSS files to run when this dashboard is loaded. These CSS files can be absolute and hosted in a third-party CDN or you can host them yourself with New-PSUPublishedFolder.
-Logo
A logo to display in the navigation bar. You can use New-PSUPublishedFolder to host this logo file.
-DefaultTheme
The default theme to show when the page is loaded. The default is to use the light theme.
-DisableThemeToggle
Disables the toggle for the theme.
-HeaderPosition
Position of the header within the dashboard.
-HeaderColor
The color of the header. This will override the theme colors.
-HeaderBackgroundColor
The background color of the header. This will override the theme colors.
-NavigationLayout
The layout of the navigation. Valid values are 'Temporary' and 'Permanent'.
-Navigation <Hashtable[]>
The navigation for the dashboard. This is an array of navigation items.
-HideUserName
Obsolete. This parameter was intended for testing purposes.
-HideNavigation
Obsolete. This parameter was intended for testing purposes.
-LoadNavigation
An endpoint to load navigation items. This endpoint should return an array of navigation items.
-HeaderContent
An endpoint to load content into the header.
-PageNotFound
An endpoint to load content when a page is not found.
-NotAuthorized
An endpoint to load content when a user is not authorized.
-SessionTimeoutModal
A script block that will be executed when the session times out.
-Menu
An endpoint to load a menu into the dashboard.
Common parameters
This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Outputs
Examples
Example 1
Creates a new dashboard with a single page.
Example 2
Creates a new dashboard with multiple pages.
Last updated
Was this helpful?