Citrix Virtual Apps and Desktops SDK

Set-BrokerApplication

Changes the settings of an application to the value specified in the command.

Syntax

Set-BrokerApplication
   [-InputObject] <Application[]>
   [-PassThru]
   [-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>]
   [-PublishedName <String>]
   [-SecureCmdLineArgumentsEnabled <Boolean>]
   [-ShortcutAddedToDesktop <Boolean>]
   [-ShortcutAddedToStartMenu <Boolean>]
   [-StartMenuFolder <String>]
   [-UserFilterEnabled <Boolean>]
   [-Visible <Boolean>]
   [-WaitForPrinterCreation <Boolean>]
   [-WorkingDirectory <String>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->
Set-BrokerApplication
   [-Name] <String>
   [-PassThru]
   [-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>]
   [-PublishedName <String>]
   [-SecureCmdLineArgumentsEnabled <Boolean>]
   [-ShortcutAddedToDesktop <Boolean>]
   [-ShortcutAddedToStartMenu <Boolean>]
   [-StartMenuFolder <String>]
   [-UserFilterEnabled <Boolean>]
   [-Visible <Boolean>]
   [-WaitForPrinterCreation <Boolean>]
   [-WorkingDirectory <String>]
   [-LoggingId <Guid>]
   [<CitrixCommonParameters>]
   [<CommonParameters>]
<!--NeedCopy-->

Description

The Set-BrokerApplication cmdlet changes the value of one or more properties of an application, such as its CpuPriorityLevel or its CommandLineArguments, to the value specified in the command.

This cmdlet lets you change only the settings of the Application object, and not the relationships to other objects. For instance, it does not let you change which users can access this application, or change which desktop groups this application is published to. To do this, you need to remove the existing association, and then add a new association. The following example shows how to change the desktop group that an application is associated with from $group1 to $group2:

Remove-BrokerApplication -DesktopGroup $group1

Add-BrokerApplication -DesktopGroup $group2

You can change properties of HostedOnDesktop, InstalledOnClient and PublishedContent applications but it is not possible to change the ApplicationType. Also, the Name cannot be changed using this cmdlet; to do this, use the Rename-BrokerApplication cmdlet.

Examples

EXAMPLE 1

Modifies the application that has a Name of “Notepad” so that its description reads Windows Notepad.

Set-BrokerApplication -Name "Notepad" -Description 'Windows Notepad'
<!--NeedCopy-->

EXAMPLE 2

First gets the application with a BrowserName of “Calculator”, then modifies that application (by supplying the application object in the first position) so that it is disabled for users.

$app = Get-BrokerApplication -BrowserName "Calculator"
Set-BrokerApplication -InputObject $app -Enabled $false
<!--NeedCopy-->

Parameters

-InputObject

Specifies the application to modify. The Uid of the application can also be substituted for the object.

Type: Application[]
Position: 2
Default value: None
Required: True
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

Specifies the name of the application to be modified.

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

-PassThru

This cmdlet does not generate any output, unless you use the PassThru parameter, in which case it returns the affected record.

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

-BrowserName

Specifies the BrowserName of the application.

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

-ClientFolder

Specifies the folder that the application belongs to as the user sees it. This is the application folder displayed in the Citrix Online Plug-in, in Web Services, and also in the 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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-CommandLineArguments

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

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

-CommandLineExecutable

Specifies the name of the executable file to launch.

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

-CpuPriorityLevel

Specifies the CPU priority for the launched executable. 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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-Description

Specifies the description of the application.

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

-DoNotEnumerate

Specifies whether or not this application is returned to the user during enumeration.

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

-Enabled

Specifies whether or not this application can be launched.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-HomeZoneUid

Specifies any home zone preference used when launching this application.

Type: Guid
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-IconUid

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

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
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.

Reducing the limit below the currently running number of instances does not cause any of those to be stopped.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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.

Reducing the limit below the currently running number of instances does not cause any of those to be stopped.

Type: Int32
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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.

Reducing the limit below the currently running number of instances does not cause any of those to be stopped.

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

-PublishedName

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

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

-SecureCmdLineArgumentsEnabled

Specifies whether the command-line arguments should be secured. 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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-ShortcutAddedToDesktop

Specifies whether or not a shortcut to the application should be placed on the user device.

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-UserFilterEnabled

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

Type: Boolean
Position: Named
Default value: None
Required: False
Accept pipeline input: False
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: None
Required: False
Accept pipeline input: False
Accept wildcard characters: False

-WaitForPrinterCreation

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

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

-WorkingDirectory

Specifies from which working directory the executable is launched from. This setting is ignored for applications of type PublishedContent.

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

-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

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

Citrix.Broker.Admin.SDK.Application, or depends on parameter

You can pipe the application to be added to Set-BrokerApplication. You can also pipe some of the other parameters by name.

Outputs

None or Citrix.Broker.Admin.SDK.Application

This cmdlet does not generate any output, unless you use the PassThru parameter, in which case it generates a Citrix.Broker.Admin.SDK.Application object.

Set-BrokerApplication