Skip to content

Citrix XenDesktop 7.x – Query Citrix Receiver Versions connecting to your environment – XLS Report

Just recently I was tasked to identify all Citrix Receiver Versions connecting to a Citrix XenDesktop 7.x environment.

For starters, to get information on current sessions issue the following PowerShell cmdlets on your Citrix Broker Server:

Add-PSSnapin *Citrix*
Get-BrokerSession | Select MachineName,UserName,ClientPlatform,ClientVersion,*Protocol* | Out-GridView

14-12-_2016_14-00-00

To get hands on every single information of your current Broker Sessions simply run:

Get-BrokerSession | Out-GridView

Now, in terms of historical session and connection information you have to query the OData API (http://<ServerBrokerFQDN>/Citrix/Monitor/OData/v2/Data), as with the Get-BrokerSession cmdlet you only get information on current sessions. So in case you’re looking for historical reports and data, which you cannot find in the Director Web UI, you could simply create a custom report with Microsoft Excel by connecting to the Data Feed.

This leaves me with recommending the following Citrix Blog Article, that explains how to

  • connect and read the available OData Data Feed from your Citrix Broker Server,
  • read the content of the Connection table and import it into an Excel Sheet,
  • limit the data's timeframe we’re looking at,
  • add a PivotChart, and
  • filter the required data.

The result might look something like this:

14-12-_2016_14-48-30

You can then tinker with the different tables available through the Data Feed in order to achieve the resultant data set required for your purpose. As opposed to the aforementioned Citrix Blog you could select the following tables to even get information on Citrix Receiver Versions, Client Names, and corresponding User Names:

  • Connection
  • Session
  • User

Just have a look at the underlying SQL DB and its Database Diagram in order to reveal the tables' relationships:

Relationship NameTable NameTables SpecificationColumns Specifiation
Session_UserSessionsForeign Key ColumnUserId
UsersPrimary Key ColumnId
Connection_SessionForeign Key ColumnSessionKey
Primary Key ColumnSessionKey
Session_CurrentConnectionConnectionsForeign Key ColumnCurrentConnectionId
SessionsPrimary Key ColumnId

14-12-_2016_15-23-07

Then you should be able to rebuild these relationships within Microsoft Excel and get the resultant set of data including corresponding user names:

Otherwise you could create a corresponding View directly within SQL Server Management Studio on the server hosting your XenDesktop SQL Monitoring database. I created one and called it v_ReceiverVersions, thus allowing me to access the data through Excel as well. The custom View includes the aforementioned tables

  • Connection (MonitorData)
  • Session (MonitorData)
  • User (MonitorData)

SELECT MonitorData.Connection.ClientName, MonitorData.Connection.ClientVersion, MonitorData.Connection.BrokeringDate, MonitorData.[User].Upn
FROM MonitorData.Connection INNER JOIN
MonitorData.Session ON MonitorData.Connection.SessionKey = MonitorData.Session.SessionKey AND
MonitorData.Connection.Id = MonitorData.Session.CurrentConnectionId INNER JOIN
MonitorData.[User] ON MonitorData.Session.UserId = MonitorData.[User].Id

This setup allows me to filter the available data (i.e. set to the required period in time by utilizing the BrokeringDate) by either choosing ClientName, ClientVersion or UPN:

The data available in Citrix Director is dependent on your Citrix License, which in turn determines your usage data retention within Citrix Director. As per Citrix:

  • All editions: Director – real-time monitoring and basic troubleshooting (up to 7 days of data)
  • XD7 Platinum: EdgeSight performance management feature – includes #1 + historical monitoring (up to a full year of data through the monitoring SQL database)
  • XD7 Platinum + NetScaler Enterprise: EdgeSight performance management and network analysis – includes #2 plus 60 mins. of network data
  • XD7 Platinum + NetScaler Platinum: EdgeSight performance management and network analysis – includes #2 plus unlimited network data

Further reading:

Leave a Reply