Product Documentation

New-BrokerApplication

Nov 18, 2015

Creates a new published application.

Syntax

New-BrokerApplication [-Name] <String> -CommandLineExecutable <String> -DesktopGroup <DesktopGroup> [-ApplicationType <ApplicationType>] [-BrowserName <String>] [-ClientFolder <String>] [-CommandLineArguments <String>] [-CpuPriorityLevel <CpuPriorityLevel>] [-Description <String>] [-Enabled <Boolean>] [-IconFromClient <Boolean>] [-IconUid <Int32>] [-Priority <Int32>] [-PublishedName <String>] [-SecureCmdLineArgumentsEnabled <Boolean>] [-ShortcutAddedToDesktop <Boolean>] [-ShortcutAddedToStartMenu <Boolean>] [-StartMenuFolder <String>] [-UserFilterEnabled <Boolean>] [-UUID <Guid>] [-Visible <Boolean>] [-WaitForPrinterCreation <Boolean>] [-WorkingDirectory <String>] [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]

Detailed Description

The New-BrokerApplication cmdlet creates a new published application in the site.

New-BrokerApplication creates the application object, and associates it with a desktop group. Application objects have three names that identify them (in addition to their Uid): the Name, BrowserName and the PublishedName. The BrowserName is unique across the entire site, and is primarily used internally. The Name is also unique and is what is seen by the administrator. The PublishedName is not unique and is what is seen by the users.

You can create both HostedOnDesktop and InstalledOnClient applications but the ApplicationType cannot be changed later.

The following special characters are not allowed in either the Name, BrowserName or the PublishedName: \ / ; : # . * ? = < > | [ ] ( ) " '

See about_Broker_Applications for more information.

Parameters

-Name<String>

Specifies the unique name of the application.

Required? true
Default Value  
Accept Pipeline Input? true (ByPropertyName)

-CommandLineExecutable<String>

Specifies the name of the executable file to launch. The full path need not be provided if it's already in the path. Environment variables can also be used.

Required? true
Default Value (required)
Accept Pipeline Input? true (ByPropertyName)

-DesktopGroup<DesktopGroup>

Specifies which desktop group this application should be associated with. The association between application and desktop groups can be added or removed using the Add-BrokerApplication and Remove-BrokerApplication cmdlets.

Required? true
Default Value  
Accept Pipeline Input? true (ByPropertyName)

-ApplicationType<ApplicationType>

Specifies the type of the application: HostedOnDesktop or InstalledOnClient.

Required? false
Default Value (required)
Accept Pipeline Input? true (ByPropertyName)

-BrowserName<String>

Specifies the internal name for this application. It must be unique in the site.

Required? false
Default Value (same as Name)
Accept Pipeline Input? true (ByPropertyName)

-ClientFolder<String>

Specifies the folder that the application belongs to as the user sees it. This is the application folder that is seen in the Citrix Online Plug-in, in Web Services, and also in the end-user's Start menu. Subdirectories can be specified with '\' character. The following special characters are not allowed: / * ? < > | " :. Note that this property cannot be set for applications of type InstalledOnClient.

Required? false
Default Value null
Accept Pipeline Input? true (ByPropertyName)

-CommandLineArguments<String>

Specifies the command-line arguments to use when launching the executable. Environment variables can be used.

Required? false
Default Value null
Accept Pipeline Input? true (ByPropertyName)

-CpuPriorityLevel<CpuPriorityLevel>

Specifies the CPU priority for the launched process. Valid values are: Low, BelowNormal, Normal, AboveNormal, and High. Note that this property cannot be set for applications of type InstalledOnClient.

Required? false
Default Value Normal
Accept Pipeline Input? true (ByPropertyName)

-Description<String>

Specifies the description of the application. This is only seen by Citrix administrators and is not visible to users.

Required? false
Default Value null
Accept Pipeline Input? true (ByPropertyName)

-Enabled<Boolean>

Specifies whether or not this application can be launched.

Required? false
Default Value true
Accept Pipeline Input? true (ByPropertyName)

-IconFromClient<Boolean>

Specifies if the app icon should be retrieved from the application on the client. This is reserved for possible future use, and all applications of type HostedOnDesktop cannot set or change this value.

Required? false
Default Value false
Accept Pipeline Input? true (ByPropertyName)

-IconUid<Int32>

Specifies which icon to use for this application. This icon is visible both to the administrator (in the consoles) and to the user. If no icon is specified, then a generic built-in application icon is used.

Required? false
Default Value 2
Accept Pipeline Input? true (ByPropertyName)

-Priority<Int32>

Specifies the priority of the mapping between the application and desktop group. A value of zero has the highest priority, with increasing values indicating lower priorities.

Required? false
Default Value  
Accept Pipeline Input? true (ByPropertyName)

-PublishedName<String>

The name seen by end users who have access to this application.

Required? false
Default Value The same value as that supplied for the name of the application.
Accept Pipeline Input? true (ByPropertyName)

-SecureCmdLineArgumentsEnabled<Boolean>

Specifies whether the command-line arguments are secured or not. This is reserved for possible future use, and all applications of type HostedOnDesktop can only have this value set to true.

Required? false
Default Value true
Accept Pipeline Input? true (ByPropertyName)

-ShortcutAddedToDesktop<Boolean>

Specifies whether or not a shortcut to the application should be placed on the user device. This is valid only for the Citrix Online Plug-in.

Required? false
Default Value false
Accept Pipeline Input? true (ByPropertyName)

-ShortcutAddedToStartMenu<Boolean>

Specifies whether a shortcut to the application should be placed in the user's start menu on their user device.

Required? false
Default Value false
Accept Pipeline Input? true (ByPropertyName)

-StartMenuFolder<String>

Specifies the name of the start menu folder that holds the application shortcut (if any). This is valid only for the Citrix Online Plug-in. Subdirectories can be specified with '\' character. The following special characters are not allowed: / * ? < > | " :.

Required? false
Default Value null
Accept Pipeline Input? true (ByPropertyName)

-UserFilterEnabled<Boolean>

Specifies whether the application's user filter is enabled or disabled. Where the user filter is enabled, the application is visible only to users who appear in the filter (either explicitly or by virtue of group membership).

Required? false
Default Value false
Accept Pipeline Input? true (ByPropertyName)

-UUID<Guid>

An optional GUID for this application.

Required? false
Default Value A new GUID is generated if none is supplied.
Accept Pipeline Input? true (ByPropertyName)

-Visible<Boolean>

Specifies whether or not this application is visible to users. Note that it's possible for an application to be disabled and still visible.

Required? false
Default Value true
Accept Pipeline Input? true (ByPropertyName)

-WaitForPrinterCreation<Boolean>

Specifies whether or not the session waits for the printers to be created before allowing the user to interact with the session. Note that this property cannot be set for applications of type InstalledOnClient.

Required? false
Default Value false
Accept Pipeline Input? true (ByPropertyName)

-WorkingDirectory<String>

Specifies which working directory the executable is launched from. Environment variables can be used.

Required? false
Default Value null
Accept Pipeline Input? true (ByPropertyName)

-LoggingId<Guid>

Specifies the identifier of the high level operation that this cmdlet call forms a part of. Desktop Studio and Desktop Director typically create High Level Operations. PowerShell scripts can also wrap a series of cmdlet calls in a High Level Operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets.

Required? false
Default Value  
Accept Pipeline Input? false

-AdminAddress<String>

Specifies the address of a XenDesktop controller that the PowerShell snapin will connect to. This can be provided as a host name or an IP address.

Required? false
Default Value Localhost. Once a value is provided by any cmdlet, this value will become the default.
Accept Pipeline Input? false

Input Type

Depends on parameter Parameters can be piped by property name.

Return Values

Citrix.Broker.Admin.SDK.Application

New-BrokerApplication returns an Application object.

Notes

Usually only the Name is specified with the New-BrokerApplication cmdlet, and the system chooses a BrowserName and PublishedName for you. By default the BrowserName is the same as the Name, if it is unique in the site. If not, then "-x" is appended to the name, where "x" is a number. For instance, if there is already an application with a BrowserName of "Notepad" and a new application is created with a Name of "Notepad", then the new application gets a BrowserName of "Notepad-1". If another "Notepad" is published, it has a BrowserName of "Notepad-2".

That said, the BrowserName can optionally be specified as well.

Examples

-------------------------- EXAMPLE 1 --------------------------

C:\PS> New-BrokerApplication -ApplicationType HostedOnDesktop -Name "Notepad" -CommandLineExecutable "notepad.exe" -DesktopGroup PrivateDG1

Creates and returns an object for a published application called "Notepad" that launches "notepad.exe".

-------------------------- EXAMPLE 2 --------------------------

C:\PS> $dg = Get-BrokerDesktopGroup "SharedDG1" 
C:\PS> $app = New-BrokerApplication -ApplicationType HostedOnDesktop -Name "Notepad" -CommandLineExecutable "notepad.exe" -DesktopGroup $dg 
C:\PS> $group = Get-BrokerDesktopGroup -Name "Shared desktop group" 
C:\PS> Add-BrokerApplication $app -DesktopGroup $group 
C:\PS> $fta = Get-BrokerImportedFTA -ExtensionName ".txt" 
C:\PS> New-BrokerConfiguredFTA -ImportedFTA $fta -ApplicationUid $app.Uid

This is a much more complete example. It creates an application object to publish Notepad and associates it first with the "SharedDG1" desktop group.

Next it adds an additional desktop group (one that can host applications), and publishes the application to that desktop group. It then gets the ImportedFTA object for the .txt file-type extension (this assumes file-type associations have already been imported), and then configures it so that ".txt" is associated with the published application.

Note: The appropriate access policy and app assignment/entitlement rules must also be configured to allow access to the application.