> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/powershell-commands/new-psudashboard.md).

# New-PSUDashboard

### Synopsis

Creates a new app in PowerShell Universal.

### Syntax

```powershell
New-PSUDashboard [-AppToken <String>] [-Authenticated] [-AutoDeploy] [-BaseUrl <String>] [-Command <String>] [-Component <DashboardComponent[]>] [-ComputerName <String>] [-Credential <String>] [-Description <String>] [-DisableAutoStart] [-DisableErrorToast] [-DisableInteractiveHost] [-DisableStartupLog] [-Environment <String>] [-FavIcon <String>] [-GrantAppToken] [-IdleTimeout <Int32>] [-Integrated] [-Maintenance] [-Module <String>] -Name <String> [-Role <String[]>] [-SessionTimeout <Int32>] [-Tag <Tag[]>] [-UseDefaultCredentials] [-VerboseErrorMessages] [-ComputerGroup <String[]>] [-OnSessionTimeout <ScriptBlock>] [-AvailableInBranch <String[]>] [-TrustCertificate] [-Critical] [<CommonParameters>]

    New-PSUDashboard [-AppToken <String>] [-Authenticated] [-AutoDeploy] [-BaseUrl <String>] [-Component <DashboardComponent[]>] [-ComputerName <String>] -Content <ScriptBlock> [-Credential <String>] [-Description <String>] [-DisableAutoStart] [-DisableErrorToast] [-DisableInteractiveHost] [-DisableStartupLog] [-Environment <String>] [-FavIcon <String>] [-GrantAppToken] [-IdleTimeout <Int32>] [-Integrated] [-Maintenance] -Name <String> [-Role <String[]>] [-SessionTimeout <Int32>] [-Tag <Tag[]>] [-UseDefaultCredentials] [-VerboseErrorMessages] [-ComputerGroup <String[]>] [-OnSessionTimeout <ScriptBlock>] [-AvailableInBranch <String[]>] [-TrustCertificate] [-Critical] [<CommonParameters>]

    New-PSUDashboard [-AppToken <String>] [-Authenticated] [-AutoDeploy] [-BaseUrl <String>] [-Component <DashboardComponent[]>] [-ComputerName <String>] [-Credential <String>] [-Description <String>] [-DisableAutoStart] [-DisableErrorToast] [-DisableInteractiveHost] [-DisableStartupLog] [-Environment <String>] [-FavIcon <String>] [-FilePath <String>] [-GrantAppToken] [-IdleTimeout <Int32>] [-Integrated] [-Maintenance] -Name <String> [-Role <String[]>] [-SessionTimeout <Int32>] [-Tag <Tag[]>] [-UseDefaultCredentials] [-VerboseErrorMessages] [-ComputerGroup <String[]>] [-OnSessionTimeout <ScriptBlock>] [-AvailableInBranch <String[]>] [-TrustCertificate] [-Critical] [<CommonParameters>]
```

### Description

Creates a new app in PowerShell Universal.

### Parameters

#### -AppToken

The AppToken that is used for calling the PowerShell Universal Management API. You can also call Connect-PSUServer before calling this cmdlet to set the AppToken for the entire session.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -Authenticated [<SwitchParameter>]
        When specified, authentication is enabled for this app.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -AutoDeploy [<SwitchParameter>]
        Whether to deploy this app when changes are made. If not specified, the app needs to be restarted before changes are applied.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -BaseUrl

The base URL to access this app. You can use / to serve the app at the root of the server or /app to serve the app at /app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Command

The command used to create this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Component \<DashboardComponent\[]>

Not used. Only present for backwards compatibility.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -ComputerName

Specifies the computer name or URL that should be called when accessing the PowerShell Universal Management API. You can also use Connect-PSUServer before calling this cmdlet to set the computer name for the entire session.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      Uri
Accept wildcard characters?  false
```

#### -Content

The content of this app.

```
Required?                    true
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Credential

The user credential to run this app under.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Description

A description of this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -DisableAutoStart [<SwitchParameter>]
        Whether to disable auto starting this app when the server starts.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -DisableErrorToast [<SwitchParameter>]
        Whether to disable error toasts for this app.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -DisableInteractiveHost [<SwitchParameter>]
        Whether to disable the interactive host for this app. Write-Host, Read-Host, Get-Credential and other features will no longer work.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -DisableStartupLog [<SwitchParameter>]
        Whether to disable the startup log for this app.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Environment

The environment to run this app under.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -FavIcon

The URL to the favicon for this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -FilePath

The path to the file that contains the content for this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -GrantAppToken [<SwitchParameter>]
        Whether to grant an app token to users of this app. You can use the app token within your app to access resources of PSU as the user logging in.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -IdleTimeout

The idle timeout for this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -Integrated [<SwitchParameter>]
        Executes the command internally rather than using the Management API. Only works when running script from within PowerShell Universal.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -Maintenance [<SwitchParameter>]
        Whether to put this app into maintenance mode. Only administrators will be able to access the app when in maintenance mode.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Module

The module that contains the command used to define this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Name

The name of this app.

```
Required?                    true
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Role \<String\[]>

Roles that have access to this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -SessionTimeout

The session timeout for this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -Tag \<Tag\[]>

Tags to apply to this app.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -UseDefaultCredentials [<SwitchParameter>]
        Use default credentials when connecting to the management API

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -VerboseErrorMessages [<SwitchParameter>]
        Whether to display verbose error messages for this app.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -ComputerGroup \<String\[]>

{{ Fill ComputerGroup Description }}

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -OnSessionTimeout

{{ Fill OnSessionTimeout Description }}

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false
```

#### -AvailableInBranch \<String\[]>

When specified, this app will only be displayed and running the specified branches.

```
Required?                    false
Position?                    named
Default value                None
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -TrustCertificate [<SwitchParameter>]
        Whether the cmdlet should ignore certificate issues.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    -Critical [<SwitchParameter>]
        App is critical. This will cause the /api/v1/status endpoint to return a 500 if the app did not start.

Required?                    false
Position?                    named
Default value                False
Accept pipeline input?       False
Aliases                      none
Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
```

### Inputs

None

### Outputs

System.Object

### Notes

\-------------------------- Example 1 --------------------------

```
New-PSUDashboard -Name 'App' -BaseUrl '/app' -FilePath "app.ps1"

Creates an app using the app.ps1 file in the repository directory and serves it at the base URL of /app.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/powershell-commands/new-psudashboard.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
