Thursday, September 15, 2022

Citrix Application Performance Reports

 A user had the following request:

I have a Citrix XA/XD 7.15 LTSR environment and would like to write performance data for two applications (Ex: App1, App2) to an Excel spreadsheet using a Powershell script with the following information:
- Application launch and load times
- Application usage report with the number of users for a particular timespan

Please see the linked PowerShell scripts below. You will need to modify the variables $SQLServer and $SQLDBName for your environment and run the scripts as a Citrix Admin with rights to the Director Monitoring database.

Get-AppLogonDuration.ps1 - will create a report on logon duration for the specified applications for the past x days (defaults to 7).

Examples:

    >.\Get-AppLogonDuration.ps1 -days 3

    Will display information for ALL applications for the past 3 days

    >.\Get-AppLogonDuration.ps1 -apps "'Notepad','SnippingTool'" | Sort StartDate -Desc

    Will display information for the applications 'Notepad' and 'SnippingTool' for the past 7 days (default),
    and sort latest entries first
   
   >.\Get-AppLogonDuration.ps1 -days 30 | Sort LogonSecs -Desc | Select -first 10

    Will show the longest 10 logon times over the past 30 days


Get-UniqueAppCounts.ps1 - will create a report on the number of unique users executing the specified applications for the specified duration

Examples:
    >.\Get-UniqueAppCounts.ps1 -days 3

    Will display counts for all applications for the past 3 days

    >.\Get-UniqueAppCounts.ps1 -apps "'Notepad','SnippingTool'"

    Will display counts for the applications 'Notepad' and 'SnippingTool' for the past 7 days (default).