Citrix Virtual Apps and Desktops

Publish content

You can publish an application that is simply a URL or UNC path to a resource, such as a Microsoft Word document or a web link. This feature is known as published content. The ability to publish content adds flexibility to how you deliver content to users. You benefit from the existing access control and management of applications. And, you can specify what to use to open the content: local or published applications.

The published content appears just like other applications in StoreFront and Citrix Workspace app. Users access it in the same way they access applications. On the client, the resource opens as usual.

  • If a locally installed application is appropriate, it is launched to open the resource.
  • If a File Type Association has been defined, a published application launches to open the resource.

You publish content using the PowerShell SDK. (You cannot use Studio to publish content. However, you can use Studio to edit application properties later, after they are published.)

Configuration overview and preparation

Publishing content uses the New-BrokerApplication cmdlet with the following key properties. (See the cmdlet help for descriptions of all cmdlet properties.)

New-BrokerApplication –ApplicationType PublishedContent -CommandLineExecutable location -Name app-name -DesktopGroup delivery-group-name
<!--NeedCopy-->

The ApplicationType property must be PublishedContent.

The CommandLineExecutable property specifies the location of the published content. The following formats are supported, with a limit of 255 characters.

  • HTML website address (for example, http://www.citrix.com)
  • Document file on a web server (for example, https://www.citrix.com/press/pressrelease.doc)
  • Directory on an FTP server (for example, ftp://ftp.citrix.com/code)
  • Document file on an FTP server (for example, ftp://ftp.citrix.com/code/Readme.txt>)
  • UNC directory path (for example, file://myServer/myShare or \\\\myServer\\myShare)
  • UNC file path (for example, file://myServer/myShare/myFile.asf or \\myServer\myShare\myFile.asf)

Ensure that you have the correct SDK.

  • For Citrix Virtual Apps and Desktops service deployments, download and install the Citrix Virtual Apps and Desktops Remote PowerShell SDK.
  • For on-premises Citrix Virtual Apps and Desktops deployments, use the PowerShell SDK that is installed with the Delivery Controller. Adding a published content application requires a minimum version 7.11 Delivery Controller.

The following procedures use examples. In the examples:

  • A machine catalog has been created.
  • A Delivery Group named PublishedContentApps has been created. The group uses a Server OS machine from the catalog. The WordPad application has been added to the group.
  • Assignments are made for the Delivery Group name, the CommandLineExecutable location, and the application name.

Get started

On the machine containing the PowerShell SDK, open PowerShell.

The following cmdlet adds the appropriate PowerShell SDK snap-in, and assigns the returned Delivery Group record.

Add-PsSnapin Citrix\* $dg = Get-BrokerDesktopGroup –Name PublishedContentApps

If you are using the Citrix Virtual Apps and Desktops service, authenticate by entering your Citrix Cloud credentials. If there is more than one customer, choose one.

Publish a URL

After assigning the location and application name, the following cmdlet publishes the Citrix home page as an application.

$citrixUrl = "https://www.citrix.com/"
$appName = "Citrix Home Page"

New-BrokerApplication –ApplicationType PublishedContent –CommandLineExecutable $citrixURL –Name $appName –DesktopGroup $dg.Uid
<!--NeedCopy-->

Verify success:

Publish resources located at UNC paths

In this example, the administrator has already created a share named PublishedResources. After assigning the locations and application names, the following cmdlets publish an RTF and a DOCX file in that share as a resource.

$rtfUNC = "\\GMSXJ-EDGE0.xd.local\\PublishedResources\\PublishedRTF.rtf"
$rtfAppName = "PublishedRTF"

New-BrokerApplication –ApplicationType PublishedContent
–CommandLineExecutable $rtfUNC -Name $rtfAppName
-DesktopGroup $dg.Uid

$docxUNC = "\\GMSXJ-EDGE0.xd.local\PublishedResources\PublishedDOCX.docx"
$docxAppName = "PublishedDOCX"

New-BrokerApplication –ApplicationType PublishedContent
–CommandLineExecutable $docxUNC -Name $docxAppName
-DesktopGroup $dg.Uid
<!--NeedCopy-->

Verify success:

  • Refresh your StoreFront window to see the newly published documents.
  • Click the PublishedRTF and PublishedDOCX applications. Each document opens in a locally running WordPad.

View and edit PublishedContent applications

You manage published content using the same methods that you use for other application types. The published content items appear in the Applications list in Studio and can be edited in Studio.

Applications list in Studio

Application properties (such as user visibility, group association, and shortcut) apply to the published content. However, you cannot change the command-line argument or working directory properties on the Location page. To change the resource, modify the Path to the executable file field on that page.

Path to executable file setting in Application Settings

To use a published application to open a PublishedContent application (rather than a local application), edit the published application’s File Type Association property. In this example, the published WordPad application was edited to create a File Type Association for .rtf files.

Turn on maintenance mode for the Delivery Group before editing the File Type Association. Remember to turn off maintenance mode when you’re done.

File type association Application Settings in Studio

Refresh StoreFront to load the File Type Association changes, and then click the PublishedRTF and PublishedDOCX applications. Notice the difference. PublishedDOCX still opens in the local WordPad. However, PublishedRTF now opens in the published WordPad due to the file type association.

Examples of where applications open

For more information

Publish content