Stupid Citrix Tricks – 2

While there are a variety of products in the virtualization market place, Citrix has provided alerting and monitoring with Resource Manager since the early days of MetaFrame.   Despite moving over to EdgeSight and other tools in our environments, we still utilize RM for watching certain metrics and sending e-mail alerts on them.  Recently, I found a limitation with the Monitoring Profiles present in XenApp 4.5. 

We have a number of similar servers in our environment and a distinct monitoring profile for them.  As we added and built servers we added them to this profile.  What was unusual, is that if you right-clicked on the server in the AMC and selected set monitoring the correct profile would be selected.  However, if you went to the profile itself and listed the servers, it did not show all of them.

It appears that the monitoring profile is limited to only display 30 servers at a time.  To ensure that all servers are actually being monitored and reported on, I simply duplicated the monitoring profile and assigned the remaining servers to it.  It remains to be seen if we get more data/alerts as a result of this, but then again, I’m calling this series stupid Citrix tricks.



Stupid Citrix Tricks – 1

We are currently working on a project to move from published applications to published desktops.  With all the logistical issues and complications to make this experience as smooth as possible, one silly annoyance cropped up.  When you log into a Citrix desktop via ICA you may see this:

ICA Login to XenApp Server
ICA Login to XenApp Server

Typically, you don’t want to have your users see this because then the seemless desktop experience is a little tarnished.  There are a variety of ways to solve this problem, but the eaisest is to demonstrate your mad MSPaint skills.

On your XenApp system, look for ica256.bmp and ica.bmp under C:\Program Files\Citrix\System32.  All you have to do is open these files up and color them one solid color.  Once you do this, your users will see this:

ICA Login to XenApp Server modified
ICA Login to XenApp Server modified

Voilà, now your users hopefully won’t notice that something is different.  Of course, that Windows 2003 Login may be a dead give away.


Published Application Consistency

Currently, in my XenApp environment, we maintain nearly 300 published applications and desktops.  We also are adding 2 or 3 new applications a month.  Managing this many resources  is cumbersome especially when you rely on Session Sharing.  Session Sharing is described in the Citrix knowledge base article CTX159159 and basically causes all application launches to occur on the same XenApp server or within the same user session.  This provides a better experience for the user (since he does not have to wait for a new login to complete for every new application launched), in user management (since a user’s session is only on one XenApp server) and in user profile stability (since the user isn’t logged into multiple servers).

The main requirement for Session Sharing is to have the same application installed on all your servers.  The secondary requirements are less obvious, but listed in CTX159159.

They are:

  • Color depth
  • Screen Size
  • Access Control Filters (for SmartAccess)
  • Sound
  • Drive Mapping
  • Printer Mapping

The issue then becomes how does one review all their applications to determine that the above settings are consistent.  Pouring over the application properties in the AMC is a recipe for insanity (in my opinion).  In this post, will explore a couple of ways to ensure your applications settings are consistent.

Brute Force

The site provides a terrific resource to the French and international  Citrix community.  They have provided several terrific tools one of which is called XenApp App Manager.

CitrixTools.Net XenApp App Manager
CitrixTools.Net XenApp App Manager

With this tool you can apply a variety of application properties to as many or as few applications as you want, but this tool will not report on the current settings of your applications.  Also, this tool does not address Access Control Filters, Drive Mapping, or Printer Mapping.  So how do you gather this information?

PowerShell to the rescue

Citrix has fully embraced PowerShell (thankfully) with the development of Workflow Studio (version 2.0 was released this week).  At Synergy 2009, they also released a tech preview for a variety of XenApp PowerShell cmdlets (download the preview from this page).  These commands, while simple are very powerful and we can utilize one of them to output all the important settings necessary for consistent Session Sharing (see Brandon Shell’s excellent site about PowerShell and his post about these commands).

The following cmdlet will display all the application properties we need to check.

PS PoSh:\> get-help Get-XAApplicationReport


Gets detailed information for published applications.

Get-XAApplicationReport [-BrowserName] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Get-XAApplicationReport -InputObject <XAApplication[]> [-WhatIf] [-Confirm] [<CommonParameters>]

This cmdlet gets detailed information for published applications, including associations, such as servers, accounts, file types and icons.


For more information, type: "get-help Get-XAApplicationReport -detailed".
For technical information, type: "get-help Get-XAApplicationReport -full".

This command displays many properties, but to display the ones we are interested in for session sharing we’ll use the following command:

Get-XAApplicationReport * | select DisplayName, WindowType, ColorDepth, ConnectionsThroughAccessGatewayAllowed, OtherConnectionsAllowed, AccessSessionConditionsEnabled, AudioType, AudioRequired, SslConnectionEnabled, EncryptionLevel, EncryptionRequired, WaitOnPrinterCreation

Piping this command to format-table -wrap will ensure that all the data will display. After this, you can output to a text or spreadsheet file and compare all the properties to make sure they are consistent.