# New-RASPubRDSApp

## NAME

New-RASPubRDSApp

## SYNOPSIS

Adds a published application to a Site.

## SYNTAX

**New-RASPubRDSApp** \[-[Name](#Name)] _\<string>_ \[-[Description](#Description) _\<string>_] \[-[Enabled](#Enabled) _\<bool>_] \[-[EnabledMode](#EnabledMode) {Disabled | Enabled | Maintenance}] \[-[Icon](#Icon) _\<string>_] \[-[IconIndex](#IconIndex) _\<uint>_] \[-[InheritMaintenance](#InheritMaintenance) _\<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>_] \[-[PackagedApp](#PackagedApp) _\<string>_] \[-[Parameters](#Parameters) _\<string>_] \[-[ParentFolder](#ParentFolder) _<_[_PubFolder_](../classes-and-enumerations/pubfolder)_>_] \[-[ParentId](#ParentId) _\<uint>_] \[-[PreviousId](#PreviousId) _\<uint>_] \[-[PreviousItem](#PreviousItem) _<_[_PubItem_](../classes-and-enumerations/pubitem)_>_] \[-[PublishFrom](#PublishFrom) {All | HostPool | Group | Host | Server}] \[-[PublishFromGroup](#PublishFromGroup) _<_[_RDSHostPool\[\]_](../classes-and-enumerations/rdshostpool)_>_] \[-[PublishFromHostPoolIds](#PublishFromHostPoolIds) _\<uint\[]>_] \[-[PublishFromServer](#PublishFromServer) _<_[_RDSHost\[\]_](../classes-and-enumerations/rdshost)_>_] \[-[PublishFromServerIds](#PublishFromServerIds) _\<uint\[]>_] \[-[PublishToSite](#PublishToSite) _<_[_Site\[\]_](../classes-and-enumerations/site)_>_] \[-[PublishToSiteIds](#PublishToSiteIds) _\<uint\[]>_] \[-[ReplicateMaintenance](#ReplicateMaintenance) _\<bool>_] \[-[SiteId](#SiteId) _\<uint>_] \[-[StartIn](#StartIn) _\<string>_] \[-[StartOnLogon](#StartOnLogon) _\<SwitchParameter>_] \[-[Target](#Target) _\<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**](../classes-and-enumerations/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\[\]**](../classes-and-enumerations/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\[\]**](../classes-and-enumerations/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**](../classes-and-enumerations/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**](../classes-and-enumerations/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**](../classes-and-enumerations/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
```

-**Enabled \<bool>**\
Enable or disable a published resource.

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**EnabledMode <**[**PubResourceEnabledMode**](../classes-and-enumerations/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\[\]**](../classes-and-enumerations/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](../classes-and-enumerations/pubfolder)

## OUTPUTS

[PubRDSApp](../classes-and-enumerations/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.\
&#xNAN;**---------- 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)
