Product Documentation

Publish content

Jun 13, 2017

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

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 XenApp and XenDesktop Service deployments, download and install the XenApp and XenDesktop Remote PowerShell SDK.
  • For on-premises XenApp and XenDesktop 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 XenApp and XenDesktop 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

Verify success:

localized image

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

Verify success:

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

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.

localized image

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.

localized image

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. 

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

localized image

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.

localized image

For more information