Citrix Admins out there probably know the issue; a user reports a problem and you need to troubleshoot the problem on the specific server that this user was logged on to. Logging on with user credentials to a certain server is not that easy, unless you create/modify a published desktop (or published application for that matter).
I created a little tool which allows you to easily connect to a published resource on a specific server. You can download it from the Tools section of my site and it’s called ICA Connect.
This tool was created to be used with Login VSI, this tool may therefore not be used with other benchmarking or loadtesting tools than Login VSI.
Using it in your Citrix environment for troubleshooting or to allow end-users to use it is allowed.
ICA Connect uses the locally installed ICA Client to create the connection, so be sure that you have installed a valid client. I actually tested it only with Citrix Receiver 3.1, but I think it should work with ICA Client 10 and up. Another prerequisite is to have .Net Framework 2.0 installed.
To get the complete list of options, use:
This will output the following:
ICAConnect v0.9 (c) 2012 Login Consultants Created by: Floris van der Ploeg -------------------------------------------------------- Usage: ICAConnect /server SERVER [/application PublishedAppName] /user Username /password Password [/domain DomainName] [/color 16|256|16bit|24bit] [/resolution 1024x768] [/uselb] [/lbtype tcp|http] [/xendesktop] Options: /server Server XenApp server to connect to; if the /uselb switch is set, this server is used to do load-balancing. /user Username Username to use when connecting to the XenApp server. /password Password Password to use when connecting to the XenApp server. /domain Domain Domain to use when connecting to the XenApp server. /application AppName Published application name (not display name) to connect to. If this option is not set, the connection will be made to the server's desktop /color ColorDepth Color depth to use in ICA session; possible values are 16, 256, 16bit or 24bit. /resolution 800x600 Resolution to use in ICA session; the width and height values are split by the "x" character. /uselb Use load balancing instead of making a connection directly to the server defined in the /server option /lbtype Type Browser type to use when connecting; possible values are TCP or HTTP. This option is only used when the /uselb option is used. /xendesktop Use the ICA client integrated XenDesktop viewer. This option is only valid for older ICA Clients.
The Server, User and Password arguments are mandatory.
Connecting to a specific server
To connect to a specific server, use the following command:
ICAConnect.exe /server XASRV001 /User TestUser1 /Password MyPassword /Domain LAB
This will connect to server XASRV001 with user TestUser1 in domain LAB. It will connect to the server’s desktop, it could be that you have to define a Citrix Policy allowing connections to the server desktop. You can also define a published application or published desktop name:
ICAConnect.exe /server XASRV001 /application MyPublishedApp /User TestUser1 /Password MyPassword /Domain LAB
This allows you to connect to the published application named “MyPublishedApp” on server XASRV001. So the connection will bypass Citrix loadbalancing and connect directly to the server.
To use the loadbalancing functionality of Citrix itself, use the following command:
ICAConnect.exe /server XASRV001 /application MyPublishedApp /UseLB /User TestUser1 /Password MyPassword /Domain LAB
This uses a connection to XASRV001 to make the ICA connection to published application named “MyPublishedApp”. With this connection, the defined load evaluators will be in effect and the ICA connection is made to the server with the least load.
By default (if not defined), the load balancing method is HTTP. If TCP is used in your environment, you can define this in the commandline:
ICAConnect.exe /server XASRV001 /application MyPublishedApp /UseLB /LBType TCP /User TestUser1 /Password MyPassword /Domain LAB
Using this tool, you can also define the resolution and colordepth. Valid colordepth options are as follows:
The color depth is defined by the “/color Depth” switch:
ICAConnect.exe /Server XASRV001 /Color 16bit /User TestUser1 /Password MyPassword /Domain LAB
This will use 16bit color depth in the connection. The screen resolution can be used by defining the “/resolution WidthXHeight“. The resolution size is split by the “x” character. For example: the 800 by 600 screen size is defined by “800×600”:
ICAConnect.exe /Server XASRV001 /Resolution 800x600 /Color 16bit /User TestUser1 /Password MyPassword /Domain LAB
It probably goes without saying, but all the command line options can be defined.
If you need more information about this commandline tool, feel free to leave a comment or contact me via email.
I’ve updated the version of ICAConnect, the /xendesktop option has been removed (since it actually didn’t make any difference) and I’ve added the following options:
- /encryption EncType
The /encryption parameter allows you to define the session encryption. Valid values are as follows:
- Basic (basic encryption)
- RC5-Logon (RC5-128bit for logon process only)
- RC5-40 (RC5-40bit)
- RC5-56 (RC5-56bit)
- RC5-128 (RC5-128bit)
The /silent switch allows you to suppress all messages at the console. So, connecting to server XASRV001, with RC5-128bit encryption in silent mode would be done as follows:
ICAConnect.exe /Server XASRV001 /Encryption RC5-128 /Silent /User TestUser1 /Password MyPassword /Domain LAB