Product Documentation

Configuring XenApp from the Command Line

May 08, 2015
Note: The Command Syntax topic lists and describes all XenApp configuration command-line options. This topic contains information about using the XenApp configuration command and its options.

Command Conventions

Several options use Boolean values (true or false).
  • If you omit an option that requires a Boolean value, the default value is used. For example, if you do not include the /AddLocalAdmin:True|False option in the command, the default value (false) is used (that is, a local administrator is not added).
  • If you specify an option that requires a Boolean value but you omit the value, the option default value is true. For example, for the /AddLocalAdmin:True|False option, if you specify only /AddLocalAdmin (with no :True or :False value), the option is true (that is, a local administrator is added).

You can use environment variables to represent one or more command-line options. For example, you can group the standard Pause, Confirm, and NotStrict options as a single environment variable. You can also use environment variables in the command-line option values. For example, /ServerName:%currentServer%, where currentServer is defined as an environment variable.

Command Option Categories

The following table lists options that affect the same subject, feature, or object. It also indicates when an option is required. (The table does not contain option arguments; see Command Syntax for full option descriptions.)
Subject, Feature, or Object Options

Configuration process

  • /NotStrict
  • /Confirm
  • /Pause
  • /LogFilename

XML Service Information

  • /CustomXMLServicePort

General farm information

  • /ExecutionMode - required when creating, joining, or leaving a farm
  • /FarmName - required when creating a farm
  • /CitrixAdministratorAccount - required when creating a farm
  • /LicenseServerName
  • /LicenseServerPort
  • /ZoneName
  • /AddLocalAdmin

Database used for the XenApp farm data store

  • /SqlExpressRootDir
  • /SimpleDB - this option and /DsnFile are mutually exclusive
  • /ServerName - required when joining a farm if you specified /SimpleDB when creating the farm
  • /DsnFile - required when creating or joining a farm if you are using a SQL Server or Oracle database; this option and /SimpleDB are mutually exclusive
  • /AuthenticationType
  • /OdbcUserName - required when creating and joining a farm
  • /OdbcPassword - required when creating and joining a farm

If you use a Microsoft SQL Server Express database, you can simplify configuration by using the /SimpleDB option when creating the XenApp farm. When joining a farm that uses a Microsoft SQL Server Express database, use the /ServerName:server_name option to specify the name of the XenApp server on which you created the farm.

Session shadowing
Shadowing is enabled by default.
Important: Citrix recommends using the default values (that is, do not specify them in this command). Shadowing settings specified during XenApp configuration override system or domain policy for user-to-user shadowing. Shadowing features are permanent and should be changed only if you wish to permanently prevent system or domain policy from affecting that setting. If you disable shadowing or change shadowing features during configuration, you cannot reconfigure them later.
  • /ProhibitShadowing
  • /ProhibitRemoteControl
  • /ForceShadowPopup
  • /ForceShadowLogging

Remote Desktop Users Group

  • /AddAnonymousUsersToRemoteDesktopUserGroup
  • /AddUsersGroupToRemoteDesktopUserGroup
  • /AddAuthenticatedUsersToRemoteDesktopUserGroup

XenApp image preparation and provisioning

  • ExecutionMode:ImagePrep

Requires the updated XenApp Server Configuration Tool; see CTX124981.

Return Codes

The XenAppConfigConsole command supports the following return codes:
Value Meaning
0 Success
1 Invalid command-line options - for example, the command includes the options /ServerName:server_name and /ExecutionMode:Create (an option that is valid only when joining a farm was specified when creating a farm)
2 Unmatched parameters - an unrecognized option was specified
3 Invalid parameters - for example, for an option that requires a Boolean value (that is, True or False), you specified 'Bob'
4 Commit failed - the configuration process did not complete; check the log file for details

Mapping of Earlier XenApp Version Properties to Options

Earlier XenApp versions supported installation and configuration properties. Some of those properties have equivalent options in XenApp for Windows Server 2008 R2.
Property in Earlier XenApp Version Option in XenApp for Windows Server 2008 R2
CTX_MF_FARM_SELECTION /ExecutionMode
CTX_MF_NEW_FARM_NAME /FarmName
CTX_MF_DOMAIN_NAME, CTX_MF_USER_NAME /CitrixAdministratorAccount:domain\user
CTX_MF_SILENT_DSNFILE /DsnFile
CTX_MF_ODBC_USER_NAME /OdbcUserName
CTX_MF_ODBC_PASSWORD /OdbcPassword
CTX_MF_LICENSE_SERVER_NAME /LicenseServerName
CTX_MF_LICENSE_SERVER_PORT /LicenseServerPort
CTX_MF_ZONE_NAME /ZoneName
CTX_MF_XML_PORT_NUMBER, CTX_MF_XML_CHOICE /CustomXmlServicePort
CTX_MF_SHADOWING_CHOICE:yes /ProhibitShadowing:false
CTX_MF_SHADOW_PROHIBIT_REMOTE_ICA /ProhibitRemoteControl
CTX_MF_SHADOW_PROHIBIT_NO_NOTIFICATION /ForceShadowPopup
CTX_MF_SHADOW_PROHIBIT_NO_LOGGING /ForceShadowLogging
CTX_MF_ADD_ANON_USERS /AddAnonymousUsersToRemoteDesktopUserGroup
CTX_MF_CREATE_REMOTE_DESKTOP_USERS /AddUsersGroupToRemoteDesktopUserGroup

Command Syntax

Command Syntax

On the server where the XenApp server role is installed, from C:\Program Files (x86)\Citrix\XenApp\ServerConfig, type the following at a command prompt:

XenAppConfigConsole.exe [options]

Options

/help
Displays command help.
/NotStrict
Allows the executable to continue processing even if options do not apply in the current context.
/Confirm
Displays a confirmation message before modifying the server. This can be useful when testing for correct use of command options.
/Pause
Pauses the executable after processing completes. This prevents the command prompt from closing when launching the command from a batch file.
/LogFilename:file
Logs the progress of the executable to a log file. In the log, the symbols >> indicate a function call; the symbols << indicate a function return
/SqlExpressRootDir:sql_express_install_src_dir
Specifies the location of the SQL Server Express source installation directory. Default = C:\Program Files (x86)\Citrix\XenApp\ServerConfig\SqlExpress_2008.
/ExecutionMode:Create | Join | Leave | ImagePrep
Specifies the task you want to perform. If you have not yet configured the XenApp server role, you can create a farm or add the server to (join) an existing farm.
Task Description

Create

If you have not yet configured the XenApp server role on this server: After you install XenApp on the first server, that server is where you Create a new farm during configuration and add the server to the farm.

If you previously configured the XenApp server role on this server, specifying Create removes the server from its current farm before creating another farm.

Join

If you have not yet configured the XenApp server role on this server: After you install XenApp on other servers, you Join a farm when you configure each of those servers and add each server an existing farm.

If you previously configured the XenApp server role on this server, specifying Join removes the server from its current farm before joining another farm.

Leave

(Valid only if you previously configured the XenApp server role on this server to join an existing farm) Specify Leave if you want to remove the server from the farm.

ImagePrep

(Valid only with the updated XenApp Server Configuration Tool and if you previously configured the XenApp server role on this server to join an existing farm) For information about this task, see Preparing for XenApp 6 Imaging and Provisioning.

/FarmName:farm_name
Valid only with /ExecutionMode:Create) Specifies the farm name, up to 32 characters (can include spaces). If you are using Oracle for the Configuration Logging database, do not use hyphens in the farm name.
/CitrixAdministratorAccount:domain_name\user_name
(Valid only with /ExecutionMode:Create) Specifies the domain and username for the user who will be the first Citrix administrator. The administrator has full permissions to the farm and can create additional administrator accounts.
/SimpleDB
Indicates the farm uses a SQL Server Express database for the data store.
/ServerName:server_name
(Valid only with /ExecutionMode:Join and /SimpleDB) Specifies the name of the server where the XenApp farm was created (that is, where the SQL Server Express database was installed).
/DsnFile:dsn_file
Specifies the path to the DSN file used to connect to the data store.
/AuthenticationType:Windows | Sql
(Valid only when using a SQL Server or Oracle database for the farm data store) Specifies the authentication type. Default = Windows
/OdbcUserName:odbc_user_name
Specifies the database user name in the form <DBMACHINE>\<USER> or <DOMAIN>\<USER>. SQL Server Express requires an existing Windows account, but it does not need to be a server or system administrator. XenApp configuration adds two database administrators to SQL Server Express: (local)\administrators and the supplied credentials for the local or domain user.
Specify the database user password with the /OdbcPassword option.
/OdbcPassword:odbc_password
Specifies the database user password.
Specify the database user name with the /OdbcUserName option.
/LicenseServerName:license_server_name
Specifies the name of the existing license server.
/LicenseServerPort:license_server_port
Specifies the license server port. Default = 27000
/ProhibitShadowing:True | False
Disables or enables session shadowing. Default = False (shadowing is enabled)
Important: Citrix recommends using the default values (that is, do not specify them in this command). Shadowing settings specified during XenApp configuration override system or domain policy for user-to-user shadowing. Shadowing features are permanent and should be changed only if you wish to permanently prevent system or domain policy from affecting that setting. If you disable shadowing or change shadowing features during configuration, you cannot reconfigure them later.
/ProhibitRemoteControl:True | False
(Valid only if shadowing is enabled) Prohibits or allows remote control shadowing. When this option is true, authorized users can view sessions but do not have keyboard and mouse input. Default = False
Important: Citrix recommends using the default values (that is, do not specify them in this command). Shadowing settings specified during XenApp configuration override system or domain policy for user-to-user shadowing. Shadowing features are permanent and should be changed only if you wish to permanently prevent system or domain policy from affecting that setting. If you disable shadowing or change shadowing features during configuration, you cannot reconfigure them later.
/ForceShadowPopup:True | False
(Valid only if shadowing is enabled) Enables or disables sending a shadowing acceptance popup. When this option is true, authorized users must send an acceptance prompt when attempting to shadow a session. Default = False
Important: Citrix recommends using the default values (that is, do not specify them in this command). Shadowing settings specified during XenApp configuration override system or domain policy for user-to-user shadowing. Shadowing features are permanent and should be changed only if you wish to permanently prevent system or domain policy from affecting that setting. If you disable shadowing or change shadowing features during configuration, you cannot reconfigure them later.
/ForceShadowLogging:True | False
(Valid only if shadowing is enabled) Enables or disables logging of all shadow connections. When this option is true, all shadowing attempts, successes, and failures are logged to the Windows event log. Default = False
Important: Citrix recommends using the default values (that is, do not specify them in this command). Shadowing settings specified during XenApp configuration override system or domain policy for user-to-user shadowing. Shadowing features are permanent and should be changed only if you wish to permanently prevent system or domain policy from affecting that setting. If you disable shadowing or change shadowing features during configuration, you cannot reconfigure them later.
/ZoneName:zone_name
Specifies the zone name. Default = Default Zone
/CustomXmlServicePort:port_number
Specifies the port number to be used by the Citrix XML Service. By default, the Citrix XML Service and Internet Information Service (IIS) use the same TCP/IP port (80) for communications. Specify this option if you do not want those services to share the port (for example, if you install the Citrix XML Service on a dedicated XML server). See System Requirements for more information. Default = 80
/SkipXmlSetting:True | False
When this option is true, the Citrix XML service and IIS port numbers are not configured (that is, the default port 80 is not used). Default = False
/AddAnonymousUsersToRemoteDesktopUserGroup:True | False
Enables or disables adding anonymous users to the Remote Desktop Users group. Default = True
/AddUsersGroupToRemoteDesktopUserGroup:True | False
Enables or disables adding all current users from the Users group to the Remote Desktop Users group. If you add users later, you must add them manually to the Remote Desk-top Users group. Default = True
/AddAuthenticatedUsersToRemoteDesktopUserGroup:True | False
Enables or disables adding current (and future) domain accounts in the Windows Users group to the Remote Desktop Users group. Default = False
/AddLocalAdmin:True | False
Enables or disables creation of Citrix administrator accounts for all user accounts in the local Administrators group. Default = False
/SmartAuditorServerName:smart_auditor_server_name
(Required if you installed the SmartAuditor agent on the XenApp server) Specifies the name of the SmartAuditor server.
/SsoPluginUncPath:path_to_central_store
UNC path to Single sign-on central store. Default = use Active Directory
/OnlinePluginServerUrl:wi_url_or_servername
Server name or URL of the Web Interface server used by the Citrix online plug-in.
/PcmFarmName:pcm_farm_name
Power and Capacity Management farm name.
/PcmWorkloadName:pcm_workload_name
Power and Capacity Management workload name.
EdgeSightCompanyName:edgesight_company_name
EdgeSight company name.
/EdgeSightServerName:edgesight_server_name
EdgeSight server name.
/EdgeSightServerPort:edgesight_server_port
EdgeSight server port. Default = 80
/RemoveCurrentServer:True | False

(Valid only with /ExecutionMode:ImagePrep and updated XenApp Server Configuration Tool) Enables or disables removing the current server intance from the XenApp farm. Default = True

/PrepMsmq:True | False

(Valid only with /ExecutionMode:ImagePrep and updated XenApp Server Configuration Tool) Enables or disables resetting the MSMQ ID during resealing. Default = True