At Citrix Solutions Lab, we are constantly pushing Citrix solutions to the limit as we test and scale various architectures. At many times this involves launching a great number of HDX sessions during our testing. To do this, we leverage Login Consultants’ Login VSI as an independent and industry standard session orchestrator for our tests.
Some time ago, Citrix Consulting Services published a white paper where they discussed how to use Login VSI with XenDesktop and utilize the useful custom commandline with CSV. This option allows you to use a comma separated values file to store the usernames and other information used for the test. They also provided an example script which we adopted for many of our tests which was written in Python. The whitepaper is here: Citrix XenDesktop with Login Consultants VSI.
Over time, we ran into several shortcomings. The main one being that the example only supported Web Interface as there were more incoming requirements to test with StoreFront. In addition, the minimal logging information made troubleshooting difficult, lack of exception handling or timeouts, requirement for the Python stack plus third party libraries to run, and the requirement for the PAMIE library that only worked up to Internet Explorer 8. This gave us an opportunity to come up with an improved and more robust version as well as provide future value.
This opportunity came into fruition as a PowerShell script, which we called SFLauncher as an allusion to WILauncher which was the original script from CCS. This new script, while following the same process and use case of a user utilizing a browser to connect to a published resource, brought many advantages (as well as some new features) when compared to WILauncher.
The new SFLauncher script requires only PowerShell to do its magic and preserved the familiar variable order, but this time supporting StoreFront and NetScaler Gateway integrated with StoreFront. Some of the enhancements and features include logging to console and/or log file, exception handling, customizable number of retries before timeout, support for virtually any contemporary version of Internet Explorer, no need for third party stacks/components, support for two-factor authentication in NetScaler Gateway, customizable DOM IDs/names, bypassing of the plug-in assistant, customizable sleep before log off, and full help documentation via PowerShell.
TL;DR, we present to you SFLauncher.ps1. However, before you get started, please ensure that you try the script in a test environment, backup any files before making changes, and read the disclaimer at the end of this post. The SFLauncher.ps1 script is available in an updated blog post here.
By the way, this script doesn’t support AppController at this time, but we’ll be looking into it!
Please feel free to let us know in the comments if you find it useful.
This software / sample code is provided to you “AS IS” with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the software / sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software / sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software / sample code. In no event should the software / code be used to support of ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE / SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the code.