New-PSUDashboard
SYNOPSIS
Creates a new app in PowerShell Universal.
SYNTAX
New-PSUDashboard -Name <String> [-FilePath <String>] [<AppOptions>] [<ConnectionOptions>] [<CommonParameters>]
New-PSUDashboard -Name <String> -Content <ScriptBlock> [<AppOptions>] [<ConnectionOptions>] [<CommonParameters>]
New-PSUDashboard -Name <String> [-Module <String>] [-Command <String>] [<AppOptions>] [<ConnectionOptions>] [<CommonParameters>]<AppOptions>: [-BaseUrl <String>] [-Environment <String>] [-GrantAppToken] [-Maintenance] [-Authenticated] [-Role <String[]>] [-DisableAutoStart] [-Component <DashboardComponent[]>] [-SessionTimeout <Int32>] [-IdleTimeout <Int32>] [-AutoDeploy] [-Description <String>] [-Credential <String>] [-DisableErrorToast] [-DisableStartupLog] [-VerboseErrorMessages] [-Tag <Tag[]>] [-DisableInteractiveHost] [-FavIcon <String>] [-OnSessionTimeout <ScriptBlock>] [-ComputerGroup <String[]>] [-AvailableInBranch <String[]>] [-Critical].
<ConnectionOptions>: [-ComputerName <String>] [-AppToken <String>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]. Here -Credential is the app's execution credential name, not Management API Basic credentials.
DESCRIPTION
This legacy cmdlet name is an alias of New-PSUApp. Create the app from a repository file, inline content, or a module command. -FilePath is optional in the default parameter set. -Component is retained for compatibility but not used. -Critical makes an app-start failure cause the /api/v1/status endpoint to return 500.
EXAMPLES
New-PSUDashboard -Name 'App' -BaseUrl '/app' -FilePath 'app.ps1'Creates an app using the app.ps1 file in the repository and serves it at /app.
PARAMETERS
-Name
Required app name.
-FilePath
Path to the app script in the repository.
-Content
Inline app script block (required in the Content parameter set).
-Module
Module containing the app-defining command.
-Command
Module command used to define the app.
-BaseUrl
App URL path (for example /app); defaults to /.
-Environment
Execution environment for the app.
-GrantAppToken
Grants app users an app token for accessing PSU as themselves.
-Maintenance
Enables maintenance mode.
-Authenticated
Requires authentication for the app.
-Role
Roles allowed to access the app.
-DisableAutoStart
Disables startup with the server.
-Component
Backward-compatibility option; unused.
-SessionTimeout
App session timeout.
-IdleTimeout
App idle timeout.
-AutoDeploy
Deploys app changes automatically.
-Description
App description.
-Credential
Name of the app execution credential (not Management API authentication).
-DisableErrorToast
Suppresses app error toasts.
-DisableStartupLog
Disables the app startup log.
-VerboseErrorMessages
Shows verbose app error messages.
-Tag
Tags applied to the app.
-DisableInteractiveHost
Disables interactive host features such as Read-Host.
-FavIcon
App favicon.
-OnSessionTimeout
Script block to run on session timeout.
-ComputerGroup
Computer groups assigned to the app.
-AvailableInBranch
Restricts the app to these branches.
-Critical
Treats app startup failure as a status endpoint failure.
-ComputerName
Target PSU server URL or host name (alias -Uri).
-AppToken
Management API app token.
-UseDefaultCredentials
Uses current Windows credentials.
-Integrated
Uses the in-process management client.
-TrustCertificate
Ignores certificate validation errors.
-Cookies
Reuses session authentication cookies.
PERMISSIONS
The access token requires apps/create to run this cmdlet remotely.
Last updated
Was this helpful?