Desktop Restart – Citrix Storefront Power Management


If you have noticed the Restart button for published desktops in Citrix Virtual Apps and Desktops 7 1912 LTSR recently and wondered why in the world Citrix would give users access to users to restart machines, you are not alone. Make no mistake, this is a perfectly fine setting to be enabled out-of-the-box for VDI deployments where just Desktop OSes are being published or on the delivery group that contains Desktop OSes. You would want your users to be able to restart the desktop every now and then anyway.

Now after going through the Citrix SDK documentation, I found the below notes for the -AllowRestart argument that governs the restart button.

AllowRestart (System.Boolean) Indicates if the user can restart sessions delivered from the rule’s desktop group. Session restart is handled as follows: For sessions on single-session power-managed machines, the machine is powered off, and a new session launch request made; for sessions on multi-session machines, a logoff request is issued to the session, and a new session launch request made; otherwise the property is ignored.

So, it isn’t too bad to have that button available for RDSH delivery groups but should probably be called something else. The name “restart” has a negative vibe to it in multi-session world. lol

The option\button will appear like the below.

How would you remove the Restart option?

You will need to do this via Powershell.

asnp citrix*
Get-BrokerAccessPolicyRule

Find the delivery group that has RDSH based published desktops and take a note of the Name parameter. You can do this on all the delivery groups if you want to disable this button for all published desktops, both RDSH and VDI.

Run the below command to find the value for the delivery group that you want to turn OFF the setting for. The parameter we are looking for is AllowRestart. When the value is True, Restart button is shown. Setting it to False will remove the button from Storefront.

Get-BrokerAccessPolicyRule -Name "XA-W2K16-DG-CORE_Direct_1"

Now, run the below command to turn off the Restart button

Set-BrokerAccessPolicyRule -Name "XA-W2K16-DG-CORE_Direct_1" -AllowRestart $False

You may need to do this for the AG version and Direct version of the delivery group.

Direct Version
Access Gateway version

Refresh the Storefront page via gateway and internally to see the results.

That’s all to it folks. Have a good one!

Automation of a XenDesktop/XenApp deployment – Part 2


As I discussed during my previous blog there are many parts necessary for a fully functional Citrix XenDesktop / XenApp environment.  In this part of the series we are going to cover the Citrix Licensing server.

The blog will be shorter than the previous blog due to the fact that there is only one component to the Citrix Licensing server. However, we will also cover how to deal with a known issue during automation which is related to automation leaving the license location in the License server empty.

The command line switches for automation of the license component is again very straight forward.

XenDesktop/XenApp Licensing Server

Example – C:\{Location}\x64\XenDesktop Setup\XenDesktopServerSetup.exe /COMPONENTS LICENSESERVER /NOREBOOT /QUIET /CONFIGURE_FIREWALL

This will install the License Server portion of a XenDesktop/XenApp deployment silently and defer the reboot.  You can run this string as many times as you would like and the end result will be the same.

Based upon my experience with automation I have discovered a known issue which is that within the License Server configuration the location of the specified license file will be blank.  This can lead to issues with functionality.

Know Issue with unattended installation

We can automate address this issue through PowerShell.  Below I will outline how to do so.  The company that I work for make a software solution for managing your PowerShell solutions.  This will provide you with a centralized location for management of your scripts, and assist with WHEN the scripts will be executed.  Additionally, you can design your solution 1 time and utilizes the solution anywhere when deploying XenDesktop / XenApp.

  1. Stop the Citrix License Server service
    1. This is done through a net stop command
  2. Parse through the license server configuration xml file located at
    1. C:\Program Files (x86)\Citrix\Licensing\LS\conf\server.xml
    2. This can be done by piping the contents of the XML file into a variable
    3. $serverxml = [xml] (Get-Content -path “C:\Program Files (x86)\Citrix\Licensing\LS\conf\server.xml” )
    4. You have now captured the contents of the XML file
  3. Locate within the XML file where the license file is specified, under the following value and assign it to a variable
    1. $element = $serverxml.configuration.licenseServer.vendorDaemons.daemon
      1. Where-Object {$_.executable -eq “CITRIX”}
    2. Write the value of your licensing file into the XML file
      1. $element.license = “The location of your license file”
    3. Save the server.xml file
      1. $serverxml.Save
    4. Start the Citrix License Server service

 

Bonus points – You could also utilize this level of automation to quickly replace the licensing file within your deployment in an automated method vs. manually going through the License Server web interface.  IE – Whenever it would be time to change out your license file simply replace the file and run the script.

In my next article in the series we will be outlining the process for deployment of the Citrix Studio portion of your XenDesktop / XenApp.  If you have any tips or tricks that could be helpful.  Please share I would love to share ideas, and share any information you are aware with the rest of my readers.

Setting Up HDX Flash Redirection – XenApp & XenDesktop


Setting up flash redirection to work in Citrix could sometimes be a daunting task. There are a multitude of moving parts to this solution and a slight error could lead to days of troubleshooting and remediation work. I thought i will document the procedures that I followed to successfully setup Flash redirection to work on  XenApp 7.5 farm and thin clients for a customer environment.

I am not going into the details of this technology and what each versions flash redirection does as you can read about them here

I strongly recommend you read the PDF document from Citrix on HDX redirection in general.

The below procedures apply to all the versions of XenApp and XenDesktop where flash redirection is applicable. My particular case was XenApp 7.5 with IE 11

Please also check the pre-requisites section on this Citrix KB article https://support.citrix.com/article/CTX205558

We will split the setup into 2 parts – Server side (VDA or Citrix Servers) setup and Client side setup

Server Side setup

  • Citrix Policies – Setup the Citrix policies for flash in Studio or Delivery Services Console as the case may be. Below is how they should look like if they are correctly configured. Also note that the latency threshold may differ according to your network conditions.

Capture

  • Flash Hotfixes – Look out for any specific hotfixes by Citrix to enable Flash acceleration. There is one required for XenApp 7.5 VDA and is available here . You may have a different version so go online and check if there is a specific hotfox availabe for Flash redirection to work. I had to download the hotfix and install on the VDA

cap1

  • Version of IE – 32 bit Internet Explorer must be used for Flash redirection to work even if you are using a 64 bit OS like Windows Server 2012 R2. Citrix recommends using IE 11
  • Flash Player Active X Plugins – Active X plugins are required on the server side for flash acceleration to work. These plugins integrate with Internet Explorer and could be installed separately if you are using IE 10 and below. You may visit Adobe Flash website to download a specific version of the Active X component. With IE 11, the Active X components are built-in alongside the browser (not a good thing in my opinion) and update are available as Windows updates from Microsoft’s site.

cap2

  • Flash Player NPAPI Plugins – It’s good to keep the IE Active X Controls and the NPAPI plugin versions the same. Though NPAPI plugins are required only for non-IE browsers according to theory, this seem to have an effect on the success of flash redirection

cap3

  • Special IE Settings – Disable Enhanced Protection Mode in IE, Some websites like YouTube.com need to be added to compatibility view mode for flash redirection to work. you may also need to add the website to Trusted Sites in IE in certain cases.

Client Side Setup

  • Flash Player Active X Plugins/Controls – This is a critical piece. This should either be equal to or greater than the version being run on the server.
  • Flash Player NPAPI Plugins – I would say this is the most important bit as we found out that even though you use IE in the Citrix session, NPAPI versions are compatibility checked and matched. If the check failed, flash redirection stopped working regardless of the Active X (IE) version. Keep client side NPAPI version the same or above as your NPAPI version on the server for Flash redirection to work.
  • Configure the ADM file for HDX Mediastream for Flash on all the corporate domain joined clients. This is not a requirement but still nice to have configured. Without this, your clients will still work if they meet the rest of the requirements

Other key things to note

  • Dont perform an upgrade of an existing Flash player plugin for client or server. Always install a fresh copy.
  • Flash Logging is a must have when you setup flash redirection. In most of the cases, logging will be turn ON by default and will be found under Event Viewer > Applications and Service Log > Citrix >Multimedia >Flash
  • When Flash redirection works, PseudoContainer.exe will run on the client device. Spot it using Task Manager >Details/Processes Tab
  • There is a troubleshooting guide for Flash redirection from Citrix and could be found here http://support.citrix.com/article/CTX127188
  • Citrix has got a How to guide for setting up Flash and could be found here http://support.citrix.com/article/CTX124190
  • Flash Logging could be enabled following the KB http://support.citrix.com/article/CTX141595
  • Check the Flash Redirection compatibility KB from Citrix here http://support.citrix.com/article/CTX136588

That’s it folks. Feel free to post your comments below

 

Tuning HDX policies for optimal end user performance – XenApp/XenDesktop 7.6 FP3


With the release of 7.6 feature pack 3, the default graphics delivery behavior has changed and the enhanced Thinwire Compatibility mode is not available via user policies. You will need to take into consideration about the different use cases and the importance of policy precedence to ensure the intended delivery method is used. If FrameHawk is specifically applied to a subset of users, they will use FrameHawk even if a higher priority policy specifies Thinwire Compatibility mode. here is a cheat sheet from Citrix to make your life a lot easier when configuring HDX policies

Capture2