Citrix Workspace Command Line



Additional command-line arguments can follow the above format or be passed to the.exe stubs. For both the stub and the direct launch methods, SSP will take care of authentication and interaction with the Web Interface or StoreFront. Alternatively to -launch, -qlaunch, which has a simpler syntax, can be used. Please see below for details. Using the SelfService.exe on the command line The SelfService.exe is part of Citrix Workspace app. This executable aggregates (retrieves) a user's resources. With resources I refer to published applications and published desktops.

Citrix Workspace app is here to replace Citrix Receiver with a new UI and capabilities (primarily for Citrix Cloud customers). Here’s how to deploy it across various supported platforms in a modern management capacity with Microsoft Intune.

Invoke Citrix XenApp and enumerate all published resources. If you specify both -E and -L, the last option on the command line takes effect. The utility then terminates, possibly leaving a connection open. For each resource the following details are written to standard output, enclosed in single quotation marks and separated by tab characters. Invoke Citrix XenApp and enumerate all published resources. If you specify both -E and -L, the last option on the command line takes effect. The utility then terminates, possibly leaving a connection open. For each resource the following details are written to standard output, enclosed in single quotation marks and separated by tab characters.

Windows 10

There are multiple deployment options for Workspace app on Windows via Microsoft Intune:

  • Workspace app from the Microsoft Store. This version has some feature limitations but requires the least amount of effort to deploy
  • The full Workspace app that provides the best compatibility, but doesn’t ship as a Windows Installer file and therefore requires custom solutions to deploy

Microsoft Store

Adding the Workspace app from the Microsoft Store is well documented and should take only 5 minutes to get the app from the Store, synchronise to Intune and assign the app to your users. How’s that for done and dusted? - I’m sure you’ve got better things to do than package and maintain applications.

Citrix Workspace in the Microsoft Store

Citrix Workspace Command Line

The Workspace app can be assigned as available for end-users to install via the Intune Company Portal or required for automatic deployment. Once deployed, the Store will take care of updates, thus there is no further action required by the administrator.

Citrix Workspace app in the Microsoft Intune Company Portal

If you have already deployed Citrix Receiver from the Microsoft Store via Intune, it should be automatically updated to Citrix Workspace. One they key feature limitations of the Microsoft Store version is pass-through authentication, so you might need to consider alternative deployment options

PowerShell

The Workspace app installer is a single executable just it has been with Citrix Receiver. This presents a challenge to deploy Workspace app as a line-of-business application with Intune which requires Win32 applications to be packaged as a single Windows Installer file. PowerShell scripts are a simple alternative, but deploying applications via PowerShell has two key considerations:

  • PowerShell scripts can’t be applied to computer groups
  • PowerShell scripts are executed on devices only when an Azure Active Directory user is signed in to the device

Deploying this way also means that the Workspace app will be deployed regardless of user choice and of course does not support deployment via the Intune Company Portal.

Like we’ve done previously with Citrix Receiver, the Workspace app can be deployed to Windows 10 machines via Intune with PowerShell without requiring custom packaging. We need a consistent URL that will always download the latest version of Workspace app and a command line to perform a silent installation. Your command line options might differ depending on your target environment, but the example script below will download and install the Workspace app.

Once deployed, devices must then rely on auto-updates to ensure that Workspace app is kept up-to-date.

Re-package Citrix Workspace app for Windows Installer

With the right tools and a bit of effort, Citrix Workspace app can be re-packaged into a single Windows Installer file. Once you’ve packaged the app with this method you’ll need to maintain the package and update it regularly. As with the PowerShell method though, auto-updates will keep Workspace app up-to-date once deployed.

Is this approach right for you? This requires maintaining and deploying a custom package and is dependent on how the environment is managed and available skillsets. Only you can answer that for your projects or environments. A custom package isn’t ideal and I recommend using the Microsoft Store version as the default approach instead.

Citrix Workspace app extracted Windows Installer files

HDX RealTime Media Engine

The Citrix HDX RealTime Media Engine - required for optimising Skype for Business under XenApp and XenDesktop, does come as a single Windows Installer file. This makes it easy then to deploy the engine to Windows PCs as a Required line-of-business application without modification or custom packaging. This will ensure that no user interaction is required to install the engine since most users are unlikely to know what it does anyway.

Bonus: Citrix Workspace app for Chrome

If you have Google Chrome deployed in your environment and you’d like to deploy the Citrix Workspace app for Chrome, this can be achieved with a PowerShell script that will either deploy it as a preference that users must approve or as a policy that will be automatically pushed out and users will be unable to remove from Chrome.

Google provides detailed documentation on deploying Chrome extensions on Windows.

Here’s a basic script to deploy Workspace app for Chrome via PowerShell that uses the app’s Chrome Web Store identifier (haiffjcadagjlijoggckpgfnoeiflnem) to tell Chrome to install the app on next launch. This shows both approaches - deploy as a preference or enforced.

Add the script to the Intune portal and assign to a user group to deploy. Ensure the script runs in the system context because it needs to write to HKLM.

macOS

The Citrix Workspace app can be deployed as a line-of-business application with Microsoft Intune. Cisco network admission control agent software for mac. The Workspace app download comes as an Installer package (inside an Apple Disk Image) that can be converted into suitable file format with the Microsoft Intune App Wrapping Tool, ready to deploy with Intune.

The Citrix Workspace app disk image

Convert the Installer

Instructions for converting a .pkg file to a .intunemac file are outlined in the documentation, and the basic process I have followed to convert the Citrix Workspace app installer file is:

  1. Download the Intune App Wrapping Tool for Mac executable - IntuneAppUtil - to a local folder. I’ve downloaded it to ~/bin.
  2. Mark the file as executable. In my example, I’ve done this with:
  1. Optionally copy the Install Citrix Workspace.pkg file to a local folder. You should also be able to run the converter against the copy stored in the disk image. In my example, I’ve copied the installer to ~/Projects/Intune-Apps. Rename the installer to remove spaces, so rename the file to InstallCitrixWorkspace.pkg.

Note: Removing the spaces from the installer name before converting is important, otherwise when installing the application, macOS will report the following error and the installing will fail to download and install:

  1. Convert the .pkg file into the required .intunemac format with a command similar to the following example - note that the -o switch should include a directory path only.

If successful the command line will look similar to the following screenshot:

Converting the Citrix Workspace app with IntuneAppUtil

The Workspace app installer will have been converted into a .intunemac format ready to import into the Intune portal for distributing to users.

The converted Citrix Workspace app

Distribute with Intune

With the prepared package, create a new line-of-business app in the Intune portal, select the .intunemac file and enter application information as follows:

  • Name - Citrix Workspace
  • Description - copy and paste the description from Workspace app on the Microsoft Store
  • Publisher - Citrix
  • Ignore app version - Yes
  • Category - Business or Productivity
  • Information URL - https://docs.citrix.com/en-us/citrix-workspace-app-for-mac.html
  • Privacy URL - https://www.citrix.com.au/about/legal.html
  • Logo - download the Workspace app icon in PNG format here

Once the details have been added, click OK to create the application. I initially had issues with uploading the application on Chrome on macOS. I was successful on Internet Explorer.

Adding the Citrix Workspace app as a line-of-business app in Microsoft Intune

Once the application has been created and assigned to users, it will be available for install in the Intune Company Portal. The application can also be set to required for automatic deployment.

Citrix Workspace available in the Intune Company Portal on macOS*

Just as on Windows, updates to the Citrix Workspace app can be managed with the inbuilt updater, post-deployment.

HDX RealTime Media Engine

The Citrix HDX RealTime Media Engine is also available as an installer package that can be converted and deployed the same way as Workspace itself. Citrix Workspace app is now a 64-bit macOS application and will, therefore, require a 64-bit version of the HDX RealTime Media Engine. Right now, a 64-bit HDX RealTime Media Engine is in tech preview that can be downloaded, packaged, uploaded as a line-of-business application and assigned.

iOS

As at the time of writing, Citrix Receiver is still available on the iOS App Store and we should see it updated to Citrix Workspace app soon. Adding an iOS application in Microsoft Intune is, fortunately, a simple process:

  1. Add an application and choose ‘Store app - iOS’, then search the app store
  2. Search for ‘Citrix’, ‘Citrix Receiver’ or ‘Citrix Workspace’
  3. Choose ‘Citrix Receiver’ or ‘Citrix Workspace’ depending on what is returned
  4. Save the change and Add the application
  5. Assign the application as required

The application will be available in the Intune Company Portal:

Citrix Workspace for iOS available in the Intune Company Portal

For existing deployments of Citrix Receiver, they should be updated to Citrix Workspace app automatically.

Android

Android Store app

At the time of writing, the Workspace app for Android is not available in the Google Play Store, but a tech preview is available for download as an APK. I would recommend deploying Citrix Receiver via the Google Play Store, but with access to an APK file, you can deploy Android applications directly to enrolled devices as a line-of-business application with Intune.

The process for deploying Citrix Workspace app or Citrix Receiver on Android follows the standard Android store app deployment steps:

  1. Add an application and choose ‘Store app - Android’, then search the app store
  2. Name - ‘Citrix Workspace’ or ‘Citrix Receiver’
  3. Description - copy and paste the description from Workspace app on the Microsoft Store
  4. Publisher - Citrix
  5. Appstore URL - https://play.google.com/store/apps/details?id=com.citrix.Receiver
  6. Minimum operating system - Android 4.4 (Kitkat)
  7. Category - Business or Productivity
  8. Privacy URL - https://www.citrix.com.au/about/legal.html
  9. Logo - download the Workspace app icon in PNG format here

Assign the application and it will be available to users in the Intune Company Portal.

Android Work Profile app

In the future, it’s more likely that organisations will leverage the Android enterprise capabilities, previously known as Android for Work. This also simplifies Android app deployment with a connection between Microsoft Intune and the Google Play store. Once configured, browse the Google Play store, approve a list of desired apps and these will then appear for assignment in the Mobile Apps node in Intune.

Here’s Citrix Receiver in the Google Play store.

Approving Citrix Receiver in the Google Play store*

Install Citrix Workspace Ltsr Via Command Line

Once approved, you must choose how new permissions will be approved:

  • Keep approved when app requests new permissions - Users will be able to install the updated app. (Default)
  • Revoke app approval when this app requests new permissions - App will be removed from the store until it is reapproved.

You can approve and deploy Citrix Receiver today, which should be automatically updated to Citrix Workspace app once it is released.

Wrap-up

In this article, I’ve covered the high-level steps required for deployment of the Citrix Workspace app across the various major platforms supported by Microsoft Intune. Mobile platforms, including the Microsoft Store on Windows 10, will require the least amount of administrative effort to configure, deploy and update. For most organisations supporting Windows as their primary platform, even with Microsoft Intune, the choice of deployment solution will depend on Workpace app feature requirements.

downloadWhy can't I download this file?

Key

Notes

REG_SZ HKLMSOFTWARECitrixDazzleInitialRefreshMinMs

Set to 1.
Setting is in milliseconds.
0 returns to the default.

REG_SZ HKLMSOFTWARECitrixDazzleInitialRefreshMaxMs

Set to 1.

Shortcuts

For any subscribed application, SSP builds a Start menu shortcut that launches an HDX session for that application when the user selects it. These shortcuts persist after the user logs off from the aggregation tier. If the user selects the shortcut without being logged on, they are prompted for credentials before the application launches. There is an exception to this: if the published application is tagged with a prefer keyword that has a value matching an existing local shortcut, no hosted shortcut is created. This is to save the overhead of a hosted launch where a local one might suffice. For further details, see http://support.citrix.com/proddocs/topic/receiver-windows-40/receiver-windows-config-app-delivery.html

SSP mimics a local install by building an .exe file that causes the application to start remotely when the file is run. Shortcuts are created for the application and an Add/Remove Software entry is also built. When SSP builds a shortcut, it builds it to a small stub application in a file %appdata%CitrixSelfServiceapp-name-with-spaces-removed.exe for each resource. These files allow SSP to create a fake 'install' record for Add/Remove Software. Running these .exe files causes the application to launch. This may be the simplest launch option for scripting: look for the relevant .exe file under the user’s profile area and execute it.

If you want to drive SSP directly for launch instead of through an .exe stub, look at the keys under HKCUSoftwareMicrosoftWindowsCurrentVersionUninstall. There will be keys in there named farm-name@@server-farm-name.app-friendly-name. In these keys you'll find a LaunchString value that shows the relevant parameters. These parameters are user-independent and can therefore be cloned from a reference user to a general case.
These launchstrings will be of the form

You can copy and reuse these parameters without interpretation. This may be off-putting if the aim is to try and build a control for these independently. It is not necessary though to understand resources at this abstract level if more control is required.

Citrix Workspace Command Line Commands

Additional command-line arguments can follow the above format or be passed to the .exe stubs.

Citrix Workspace Command Line Refresh

For both the stub and the direct launch methods, SSP will take care of authentication and interaction with the Web Interface or StoreFront.
Alternatively to -launch, -qlaunch, which has a simpler syntax, can be used. Please see below for details.

Cache file for resource details

A cache file is created per provider when SSP exits. This file records the last enumeration details and allows SSP to start up quickly. The name of the cache file is decorated with the internal store name.

Running the command selfservice.exe –init –ipoll –exit starts SSP, performs a refresh (interactive poll) from the current provider, and forces a clean exit. The cache file is then created in the %LOCALAPPDATA%citrixselfservice directory.

The cache file contains information about each resource, including all the information needed for a launch.
The launch command line contains:

If you look in a cache file (an example name might be storeservi-ee876897_cache.xml) you will see that it has a <resource> entry per application or desktop.

To construct a launch command line from this file, use the following details:

STOREIDThe name of the file (do not include _cache.xml)
RESOURCEID Contents of <internalName>
ICALAUNCHURLContents of <icaLaunchUrl>

The cache file will contain some LaunchCommandLine entries, but only for subscribed or prelaunch resources.

There is also a dump.xml file in the same location with similar content. This file is intended for external consumption (unlike the cache file). It contains some but not all LaunchCommandLines.

Other useful SSP parameters

Note that where multiple parameters are supplied, SelfService.exe executes them in order.

Parameter

Description and notes

SelfService.exe –logoff

Log off current user.

SelfService.exe –rmPrograms

Clean up shortcuts and stub programs for current user.

SelfService.exe –reconnectapps

Reconnect to any existing sessions the user has. By default happens at launch time and app refresh time.

SelfService.exe –disconnectapps

Disconnect any current HDX sessions.

SelfService.exe –createproviderStoreName StoreURL

Create a provider.
For example: SelfService.exe –init –createprovider Go https://testserver.net/Citrix/MyStore/discovery

SelfService.exe –deleteproviderbyname StoreName

Remove a provider.

SelfService.exe –deleteproviderandlocalappsbyname StoreName

Remove a provider.

SelfService.exe –poll Contact the server to refresh application details.
SelfService.exe –ipoll Contact the server to refresh application details as in –poll, but if no authentication context is available, prompt the user for credentials.
SelfService.exe –deletePasswordsRemove any stored passwords.
SelfService.exe –exitExit from SelfService.exe.
SelfService.exe –qlaunch “appname” See Note 1.

Launch applications.
Note: This parameter can be customized with <appname> <argument>. Publish the application with “%*” in command line parameter. Example: To launch published application named 'IE11' opening http://www.citrix.com, use:
selfservice.exe -qlaunch IE11 http://www.citrix.com

SelfService.exe –qlogon
See Note 1.

Reconnect any existing apps for current user.

SelfService.exe –fastterminate
See Note 1.

Log off the current user and leaves their applications connected.

SelfService.exe –terminate
See Note 1.

Disconnect applications for all users on endpoint.

SelfService.exe –terminateuser “user_name”
See Note 1.

Disconnect applications for a specific user.

SelfService.exe –logoffSessionsLog off all the active sessions for the current user
Note: This flag is available only in Receiver for Windows 4.12 and later versions.

Note 1: These parameters are available only in Receiver 4.2 and later versions.

Additional Resources

Citrix Workspace Linux Command Line

Citrix Documentation - Configure and install Citrix Receiver for Windows using Command Line parameters.