# New-RASPubRDSApp

## NAME

New-RASPubRDSApp

## SYNOPSIS

Adds a published application to a Site.

## SYNTAX

**New-RASPubRDSApp** \[[Name](#name-string)]\*\*_(string)_ \[[Description](#description-string)_(string)_] \[-[EnabledMode](#EnabledMode)\
{Disabled | Enabled | Maintenance}]\
\[[Icon](#icon-string) _(string)_]\
\[[IconIndex](#iconindex-string) _(uint)_]\
\[[InheritMaintenance](#inheritmaintenance-string)_(bool)_]\
\[-[MaintenanceMessage\_de\_DE](#MaintenanceMessage_de_DE)_(string)_]\
\[-[MaintenanceMessage\_en\_US](#MaintenanceMessage_en_US)_(string)_]\
\[-[MaintenanceMessage\_es\_ES](#MaintenanceMessage_es_ES)_(string)_]\
\[-[MaintenanceMessage\_fr\_FR](#MaintenanceMessage_fr_FR)_(string)_]\
\[-[MaintenanceMessage\_it\_IT](#MaintenanceMessage_it_IT)_(string)_]\
\[-[MaintenanceMessage\_ja\_JP](#MaintenanceMessage_ja_JP)_(string)_]\
\[-[MaintenanceMessage\_ko\_KR](#MaintenanceMessage_ko_KR)_(string)_]\
\[-[MaintenanceMessage\_nl\_NL](#MaintenanceMessage_nl_NL)_(string)_]\
\[-[MaintenanceMessage\_pt\_BR](#MaintenanceMessage_pt_BR)_(string)_]\
\[-[MaintenanceMessage\_zh\_CN](#MaintenanceMessage_zh_CN)_(string)_]\
\[-[MaintenanceMessage\_zh\_TW](#MaintenanceMessage_zh_TW)_(string)_] \[[Package](#package-string)_(string)_] \[[PackagedApp](#packagedapp-string)_(string)_] \[[Parameters](#parameters-string)_(string)_] \[-[ParentFolder](#ParentFolder)_(_[_PubFolder_](../types/pubfolder)_)_]\
\[[ParentId](#parentid-string) _(uint)_]\
\[[PreviousId](#previousid-string) _(uint)_]\
\[-[PreviousItem](#PreviousItem)_(_[_PubItem_](../types/pubitem)_)_]\
\[-[PublishFrom](#PublishFrom) {All | HostPool |\
Group | Host | Server}]\
\[-[PublishFromGroup](#PublishFromGroup)_(_[_RDSHostPool\[\]_](../types/rdshostpool)_)_]\
\[-[PublishFromHostPoolIds](#PublishFromHostPoolIds)_(uint\[])_]\
\[-[PublishFromServer](#PublishFromServer)_(_[_RDSHost\[\]_](../types/rdshost)_)_]\
\[-[PublishFromServerIds](#PublishFromServerIds)_(uint\[])_] \[-[PublishToSite](#PublishToSite)_(_[_Site\[\]_](../types/site)_)_]\
\[-[PublishToSiteIds](#PublishToSiteIds)_(uint\[])_]\
\[[ReplicateMaintenance](#replicatemaintenance-string)_(bool)_] \[[SiteId](#siteid-string) _(uint)_]\
\[[StartIn](#startin-string) _(string)_]\
\[[StartOnLogon](#startonlogon-string)_(SwitchParameter)_] \[[Target](#target-string)_(string)_] \[-[WinType](#WinType) {Normal |\
Maximized | Minimized}]\
\[_(_[_CommonParameters_](#CommonParameters)_)_]

## DESCRIPTION

Adds a published application to a Site.

You must specify the -Name and -Target parameters, or the -Package and\
-PackagedApp parameters. All other parameters are optional.

## PARAMETERS

## PublishFrom ([PublishFrom](../types/publishfrom))

Specifies the 'Publish from' option.

Acceptable values: All (All Hosts in Site), HostPool (Host Pools), Host\
(Individual Hosts).

Possible values: All, HostPool, Group, Host, Server

```
        Required?                    false

        Position?                    named

        Default value                All

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishFromGroup ([RDSHostPool\[\]](../types/rdshostpool))

Specifies one or multiple groups from which to publish the\
application.

The PublishFrom parameter must specify 1 (HostPool).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishFromHostPoolIds (uint\[])

Specifies one or multiple host pool Ids from which to publish the\
application.

The PublishFrom parameter must specify 1 (HostPool).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishFromServer ([RDSHost\[\]](../types/rdshost))

Specifies one or multiple RDS Host servers from which to publish a\
desktop.

The PublishFrom parameter must specify 2 (Host).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishFromServerIds (uint\[])

Specifies one or multiple RDS Host server Ids from which to publish a\
desktop.

The PublishFrom parameter must specify 2 (Host).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Target (string)

File name and path of a published application executable.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## StartIn (string)

Folder name in which to start a published application.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Parameters (string)

Optional parameters to pass to the published application executable.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Package (string)

The MSIX package.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PackagedApp (string)

The Application within the MSIX Package.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## StartOnLogon (SwitchParameter)

Enable or disable the 'Start automatically when user logs on' option.

```
        Required?                    false

        Position?                    named

        Default value                False

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## WinType ([WindowType](../types/windowtype))

Published application window type. Acceptable values: Normal, Maximized,\
Minimized

Possible values: Normal, Maximized, Minimized

```
        Required?                    false

        Position?                    named

        Default value                Normal

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Name (string)

Published resource name.

```
        Required?                    true

        Position?                    0

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ParentFolder ([PubFolder](../types/pubfolder))

Parent publishing folder.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       true (ByValue, ByPropertyName)

        Accept wildcard characters?  false
```

## ParentId (uint)

Parent publishing folder ID.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PreviousItem ([PubItem](../types/pubitem))

Previous published item.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PreviousId (uint)

Previous published ID.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Icon (string)

An icon to use for a publishing resource.

This can be an executable (.exe), a .dll or a .ico file.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## IconIndex (uint)

Specifies the index of the icon that will be loaded from the binary\
specified in the Icon property.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## ReplicateMaintenance (bool)

Whether the option 'Replicate Maintenance' is enabled or not.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## InheritMaintenance (bool)

Whether to inherit default Maintenance settings.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## EnabledMode

([PubResourceEnabledMode](../types/pubresourceenabledmode))\
Changes the availability status of the published resource.

Possible values: Disabled, Enabled, Maintenance

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_en\_US (string)

Maintenance message for the published resource in English.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_ja\_JP (string)

Maintenance message for the published resource in Japanese.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_fr\_FR (string)

Maintenance message for the published resource in French.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_es\_ES (string)

Maintenance message for the published resource in Spanish.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_it\_IT (string)

Maintenance message for the published resource in Italian.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_pt\_BR (string)

Maintenance message for the published resource in Portuguese.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_de\_DE (string)

Maintenance message for the published resource in German.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_nl\_NL (string)

Maintenance message for the published resource in Dutch.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_zh\_TW (string)

Maintenance message for the published resource in Chinese\
(Traditional).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_zh\_CN (string)

Maintenance message for the published resource in Chinese\
(Simplified).

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## MaintenanceMessage\_ko\_KR (string)

Maintenance message for the published resource in Korean.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## Description (string)

Published resource description.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishToSite ([Site\[\]](../types/site))

An array of sites to which to publish a resource.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## PublishToSiteIds (uint\[])

An array of Sites IDs to which to publish a resource.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

## SiteId (uint)

Site ID in which to publish the specified Item.

If the parameter is omitted, the site ID of the Licensing Server will be\
used.

```
        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        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 documentation. 
```

## INPUTS

[PubFolder](../types/pubfolder)

## OUTPUTS

[PubRDSApp](../types/pubrdsapp)

## EXAMPLES

\*\*---------- EXAMPLE 1 ----------

New-RASPubRDSApp -Name "My RDS App" -Target\
"%windir%\system32\myapp.exe"

Adds a published application package to the Licensing Server site and\
specifies the app name and executable.\
\*\*---------- EXAMPLE 2 ----------

New-RASPubRDSApp -Name "My RDS App" -Package "AppPackage1" -PackagedApp\
"TestApp1"

Adds a published application package to the Licensing Server Site and\
specifies the application name and executable.

## RELATED LINKS

* [Get-RASPubRDSApp](get-raspubrdsapp)
* [Set-RASPubRDSApp](set-raspubrdsapp)
* [Remove-RASPubRDSApp](remove-raspubrdsapp)
