Citrix Daas SDK

New-BrokerApplication

Creates a new published application.

Syntax

New-BrokerApplication
   [-AdminFolder <AdminFolder>]
   [-ApplicationType <ApplicationType>]
   [-BrowserName <String>]
   [-ClientFolder <String>]
   [-CommandLineArguments <String>]
   -CommandLineExecutable <String>
   [-CpuPriorityLevel <CpuPriorityLevel>]
   [-Description <String>]
   -DesktopGroup <DesktopGroup>
   [-DoNotEnumerate <Boolean>]
   [-Enabled <Boolean>]
   [-HomeZoneOnly <Boolean>]
   [-HomeZoneUid <Guid>]
   [-IconFromClient <Boolean>]
   [-IconUid <Int32>]
   [-IgnoreUserHomeZone <Boolean>]
   [-LocalLaunchDisabled <Boolean>]
   [-MaxPerMachineInstances <Int32>]
   [-MaxPerUserInstances <Int32>]
   [-MaxTotalInstances <Int32>]
   [-Name] <String>
   [-Priority <Int32>]
   [-PublishedName <String>]
   [-SecureCmdLineArgumentsEnabled <Boolean>]
   [-ShortcutAddedToDesktop <Boolean>]
   [-ShortcutAddedToStartMenu <Boolean>]
   [-StartMenuFolder <String>]
   [-UserFilterEnabled <Boolean>]
   [-UUID <Guid>]
   [-Visible <Boolean>]
   [-WaitForPrinterCreation <Boolean>]
   [-WorkingDirectory <String>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
New-BrokerApplication
   [-AdminFolder <AdminFolder>]
   -ApplicationGroup <ApplicationGroup>
   [-ApplicationType <ApplicationType>]
   [-BrowserName <String>]
   [-ClientFolder <String>]
   [-CommandLineArguments <String>]
   -CommandLineExecutable <String>
   [-CpuPriorityLevel <CpuPriorityLevel>]
   [-Description <String>]
   [-DoNotEnumerate <Boolean>]
   [-Enabled <Boolean>]
   [-HomeZoneOnly <Boolean>]
   [-HomeZoneUid <Guid>]
   [-IconFromClient <Boolean>]
   [-IconUid <Int32>]
   [-IgnoreUserHomeZone <Boolean>]
   [-LocalLaunchDisabled <Boolean>]
   [-MaxPerMachineInstances <Int32>]
   [-MaxPerUserInstances <Int32>]
   [-MaxTotalInstances <Int32>]
   [-Name] <String>
   [-PublishedName <String>]
   [-SecureCmdLineArgumentsEnabled <Boolean>]
   [-ShortcutAddedToDesktop <Boolean>]
   [-ShortcutAddedToStartMenu <Boolean>]
   [-StartMenuFolder <String>]
   [-UserFilterEnabled <Boolean>]
   [-UUID <Guid>]
   [-Visible <Boolean>]
   [-WaitForPrinterCreation <Boolean>]
   [-WorkingDirectory <String>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

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 or application 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; it contains any prefix for an enclosing admin folder (if any). The PublishedName is not unique and is what is seen by the users.

You can create HostedOnDesktop, InstalledOnClient or PublishedContent applications but the ApplicationType cannot be changed later.

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

In addition the ` character is not allowed in the Name property.

See about_Broker_Applications for more information.

Examples

EXAMPLE 1

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

New-BrokerApplication -ApplicationType HostedOnDesktop -Name "Notepad" -CommandLineExecutable "notepad.exe" -DesktopGroup PrivateDG1
<!--NeedCopy-->

EXAMPLE 2

Creates and returns an object for a published application called “Citrix.com” that launches the URL https://www.citrix.com/.

New-BrokerApplication -ApplicationType PublishedContent -Name "Citrix.com" -CommandLineExecutable "https://www.citrix.com/" -DesktopGroup SharedDG1
<!--NeedCopy-->

EXAMPLE 3

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.

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

Parameters

-Name

Specifies the name of the application (must be unique within folder).

Type: String
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-CommandLineExecutable

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.

Type: String
Position: Named
Default value: (required)
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ApplicationGroup

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

Type: ApplicationGroup
Position: Named
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DesktopGroup

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

Type: DesktopGroup
Position: Named
Default value: None
Required: True
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-AdminFolder

The folder in which the new application should reside (if any).

Type: AdminFolder
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ApplicationType

Specifies the type of the application: HostedOnDesktop, InstalledOnClient or PublishedContent.

Type: ApplicationType
Position: Named
Default value: (required)
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-BrowserName

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

Type: String
Position: Named
Default value: (same as Name)
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-ClientFolder

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.

Type: String
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-CommandLineArguments

Specifies the command-line arguments to use when launching the executable. Environment variables can be used. This setting is ignored for applications of type PublishedContent.

Type: String
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

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

Type: CpuPriorityLevel
Position: Named
Default value: Normal
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Description

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

Type: String
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-DoNotEnumerate

Specifies if the application is returned to the user by enumeration.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Enabled

Specifies whether or not this application can be launched.

Type: Boolean
Position: Named
Default value: True
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HomeZoneOnly

Specifies whether if the preferred zone for launching the application is its home zone but no machine is available from that zone then the launch fails.

This can only be set if the application has a home zone preference specified.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-HomeZoneUid

Specifies any home zone preference used when launching this application.

Type: Guid
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IconFromClient

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.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IconUid

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.

Type: Int32
Position: Named
Default value: 2
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-IgnoreUserHomeZone

Specifies that when launching the application and the user has a home zone specified then the user’s home zone preference should be ignored.

This can only be set if the application does not itself have a home zone preference specified.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-LocalLaunchDisabled

When launching a published application from within a published desktop, do not launch the application in that desktop session.

Type: Boolean
Position: Named
Default value: True
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxPerMachineInstances

Specifies the maximum allowed concurrently running instances of the application that an individual machine can have. A value of zero allows unlimited usage subject to any site-wide limit.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxPerUserInstances

Specifies the maximum allowed concurrently running instances of the application that an individual user can have. A value of zero allows unlimited usage subject to any site-wide limit.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-MaxTotalInstances

Specifies the maximum allowed total of concurrently running instances of the application in the site. A value of zero allows unlimited usage.

Type: Int32
Position: Named
Default value: 0
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PublishedName

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

Type: String
Position: Named
Default value: The same value as that supplied for the name of the application.
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-SecureCmdLineArgumentsEnabled

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.

Type: Boolean
Position: Named
Default value: True
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShortcutAddedToDesktop

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.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-ShortcutAddedToStartMenu

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

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-StartMenuFolder

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: / * ? < > | “ :.

Type: String
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-UserFilterEnabled

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).

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-UUID

An optional GUID for this application.

Type: Guid
Position: Named
Default value: A new GUID is generated if none is supplied.
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Visible

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

Type: Boolean
Position: Named
Default value: True
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WaitForPrinterCreation

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.

Type: Boolean
Position: Named
Default value: False
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WorkingDirectory

Specifies which working directory the executable is launched from. Environment variables can be used. This setting is ignored for applications of type PublishedContent.

Type: String
Position: Named
Default value: Null
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: True

-LoggingId

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.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Priority

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.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CitrixCommonParameters

This cmdlet supports the common Citrix parameters: -AdminAddress, -AdminClientIP, -BearerToken, -TraceParent, -TraceState and -VirtualSiteId. For more information, see about_CitrixCommonParameters.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Depends on parameter

Parameters can be piped by property name.

Outputs

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.

New-BrokerApplication