Script Library

Boost your management, troubleshoot, and remediation capabilities with scripts created by experts in the IT community.

<< Back to Script Library

Tag: citrix

(52 Scripts)
Check Profile Sizes examines user profiles for all or selected user accounts on the target machine, grouping the results by file type, using the extension.

For each group of files, if the size of the group exceeds a threshold (default 15% of the total profile size) the individual files are listed, sorted by path or by size (descending) and showing the actual file size in bytes.

To keep the output reasonably short, a threshold is set on the number of files shown individually per are listed by path (default 6) - beyond this, files are summarized by folder (order by count of files, descending).

Arguments:
ThresholdPercentToExpand (default: 15) - the threshold percent of the total profile size at which a file-extension group is listed.
SamAccountNameList (default: All) - the list of account names to be reported (comma-separated, any leading or trailing spaces will be trimmed). If set to All, the script will include local user and Active Directory user accounts.
SortBy (default: Size) - must be set to Size (individual files are listed by size, descending) or Path (individual files are listed by full path, ascending).
PreSummarySize (default: 6) - the number of files that will be listed individually (by group, according to the configured sort order) before the script switches to reporting files grouped by folder.
Version: 1.2.17  |   Created: 2023-03-08  |   Modified: 2023-03-23  |   Creator: Bill Powell  |   Downloads: 98
Synchronizing your EUC environment with ControlUp has become easier than ever before, with our new Universal Sync Script. This script lets you synchronize your VMware Horizon, CVAD or Citrix Cloud environment with ControlUp so that you can view your VDI machines or connection servers as managed machines.

https://support.controlup.com/docs/euc-synchronization-with-universal-sync-script
Version: 1.23.31  |   Created: 2022-07-29  |   Modified: 2023-02-08  |   Creator: Steve Schneider  |   Downloads: 6
Citrix HDX Optimization can improve the user experience for Teams video/audio use.
The optimization will also significantly reduce the resource consumption on the VDA.

Please report any issues and feedback
Version: 2.9.24  |   Created: 2021-01-04  |   Modified: 2021-03-05  |   Creator: Marcel Calef  |   Downloads: 574
Shadows Citrix, VMware, RDSH and WVD sessions
Version: 1.3.13  |   Created: 2020-10-15  |   Modified: 2020-10-20  |   Creator: Trentent Tye  |   Downloads: 272
Performs a test of all the technical requirements for HDX content redirection, which can potentially save bandwidth and CPU. The script's output provides the test results along with recommendations on components that need to be enabled or upgraded for content redirection to work.
Version: 1.4.20  |   Created: 2020-10-07  |   Modified: 2020-10-13  |   Creator: Marcel Calef  |   Downloads: 117
Run on a Delivery Controller or where the CVAD PowerShell snapins are available, e.g. Studio is installed. User running the script must have sufficient permission to chage the enabled state of the selected delivery groups
Version: 1.1.6  |   Created: 2020-10-06  |   Modified: 2020-10-13  |   Creator: Guy Leech  |   Downloads: 41
Show how recently (in number of days) delivery groups have had sessions launched from them, by checking the last used property for each machine in a delivery group.
Specify the minimum number of days last launched to show only delivery groups which have not had sessions launched within that number of days and optionally disable them. Specify 0 days to show all delivery groups.

Run on a Delivery Controller or where the CVAD PowerShell snapins are available, e.g. Studio is installed.
Version: 2.6.19  |   Created: 2020-10-02  |   Modified: 2020-10-09  |   Creator: Guy Leech  |   Downloads: 67
Query the selected delivery controller via OData to retrieve connection failure details for a specific user, or all users, within a specified number of days ago
Version: 2.4.10  |   Created: 2020-08-05  |   Modified: 2020-12-01  |   Creator: Guy Leech  |   Downloads: 389
There are many situations for which a machine (server OS or workstation) will lose domain trust.
If the ControlUp agent is installed on the machine, this script will execute locally and repair the domain trust. Domain credentials with permission to reset the computer account must be provided.
Version: 1.2.7  |   Created: 2020-05-06  |   Modified: 2020-05-07  |   Creator: marcel.calef  |   Downloads: 233
This Script Action checks if your Citrix ADC appliance is a VPX and if so, changes the cpuyield setting to YES to ensure no High CPU usage is reported on the hypervisor (see https://support.citrix.com/article/CTX229555)

Note: This script only changes the setting on the current ADC and most be performed on both nodes of a HA pair as the setting is node specific and not synchronized.
Version: 1.2.3  |   Created: 2020-01-05  |   Modified: 2020-02-11  |   Creator: ebarthel  |   Downloads: 37
This script creates a video of the entire user display area and saves it in a location of choice. This script requires ffmpeg.exe to be downloaded and placed in an accessible location.
Version: 1.3.4  |   Created: 2019-03-13  |   Modified: 2019-03-27  |   Creator: Ton de Vreede  |   Downloads: 180
This script gets the dimensions of the users working display area and takes screenshots. The screenshots can be saved as a BMP, JPG or PNG in a location of choice.
Version: 3.2.5  |   Created: 2019-03-13  |   Modified: 2023-03-20  |   Creator: Ton de Vreede  |   Downloads: 241
Displays the titles of all visible windows running in the user session
Version: 1.0.1  |   Created: 2019-01-13  |   Modified: 2019-01-13  |   Creator: Guy Leech  |   Downloads: 458
Finds and optionally deletes local user profiles. The user can provide two arguments - the minimum profile age in days and the minimum profile size. The default operation mode is to display the profiles that fit these criteria. When the "Delete" option is set to "true", the script will delete the profiles it found.
Version: 2.4.20  |   Created: 2018-12-26  |   Modified: 2020-06-10  |   Creator: Guy Leech  |   Downloads: 383
Show the client device Operating System type form for a specific user session.
Use this script without requesting the display of the Receiver version to get the results grouped by client OS (available only as a ControlUp Script Based Action).

Categorization of the Client OS is accomplished by querying the Citrix VDA or XA65 worker for the ClientPlatformId registry value in the appropriate Citrix ICA hive for that user session and follow the conversion described in this document:
https://www.citrix.com/mobilitysdk/docs/clientdetection.html
Version: 2.8.23  |   Created: 2018-12-08  |   Modified: 2018-12-16  |   Creator: Marcel Calef  |   Downloads: 154
Show details for all PVS target devices which are marked as active
Version: 2.3.11  |   Created: 2018-12-06  |   Modified: 2019-04-04  |   Creator: Guy Leech  |   Downloads: 118
This script queries and displays the values of performance counters for the Citrix Federated Authentication Service object. It requires the "CitrixFederatedAuthenticationService" service to exist on the target computer.
Version: 1.0.1  |   Created: 2018-11-29  |   Modified: 2018-11-29  |   Creator: Samuel Legrand  |   Downloads: 61
Citrix Apps and Desktops (formerly XenApp and XenDesktop) introduced Adaptive transport which automatically chooses between TCP & UDP for the HDX sessions. This script will leverage the ctxsession command to display the current status of the active HDX sessions.
Version: 1.10.23  |   Created: 2018-11-19  |   Modified: 2018-12-20  |   Creator: Marcel Calef  |   Downloads: 483
Show the Citrix Director actions performed in a given time window, optionally filtered on a specific user. Use this SBA to see what actions have been taken which might affect end users such as logging them off.
Arguments:
Start - optional time to show actions from. Can be specified as a date/time or as a number of units of time back from the present such as 7d or 1w where s=second,m=minute,h=hour,d=day,w=week,y=year (default is 7 days)
End - time to stop showing actions after. Can be specified either as a date/time or a number of units of time from the start value specified. (default is the current time)
If date/time values are used, they must be enclosed in double quotes, e.g. "02/02/2018 08:00:00"
Username - optional name of a user to just show changes for
Version: 1.4.6  |   Created: 2018-10-29  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 98
Show the configuration changes made in Citrix Studio in a given time window, optionally filtered on a specific user. Use this SBA to see if any changes have been made which might be affecting end users.
Arguments:
Start - optional time to show changes from. Can be specified as a date/time or as a number of units of time back from the present such as 7d or 1w where s=second,m=minute,h=hour,d=day,w=week,y=year (default is 7 days)
End - time to stop showing changes after. Can be specified either as a date/time or a number of units of time from the start value specified. (default is the current time)
If date/time values are used, they must be enclosed in double quotes, e.g. "02/02/2018 08:00:00"
Username - optional name of a user to just show changes for
Version: 1.4.14  |   Created: 2018-10-29  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 109
Recurses AD groups found to show all user accounts with any access to Citrix Studio.
Needs to be run using an account that has at least read-only Studio access.
Use it to see exactly which users have access and what level.
Arguments:
User Name to Query - an optional username or regular expression to restrict the display to

If a name is specified as a parameter then only that account is reported on
Version: 1.6.11  |   Created: 2018-10-24  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 48
Retrieve Citrix Provisioning Services audit events, if auditing has been enabled although it can be enabled by this SBA if required. Use to see what administrative actions were performed in an optional time window, by whom and what was done. It must be run with the credentials of a user who has been granted PVS access.
Arguments:
Enable Auditing - if auditing is not enabled, specifying true for this parameter will enable auditing if the user running the SBA has sufficient privilege.
Start - optional time to show audit events from. Can be specified as a date/time or as a number of units of time back from the present such as 7d or 1w where s=second,m=minute,h=hour,d=day,w=week,y=year
End - optional time to stop showing audit events after. Can be specified either as a date/time or a number of units of time from the start value specified.
If date/time values are used, they must be enclosed in double quotes, e.g. "02/02/2018 08:00:00"
Version: 1.3.6  |   Created: 2018-10-23  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 60
Pull all log separate Citrix StoreFront log files into a single time sorted csv file. You may need to change the StoreFront logging levels first which can be done with the "Show or Change StoreFront Logging" SBA. Use to help diagnose StoreFront issues.
Arguments:
Output csv file - full path to a local or remote file to store the log entries in
Start - optional time to start log export from, e.g. just before the problem started or was reproduced. Can be specified as a date/time or as a number of units of time back from the present such as 7d or 1w where s=second,m=minute,h=hour,d=day,w=week,y=year
End - optional time to stop log export at. Can be specified either as a date/time or a number of units of time from the start value specified.
If date/time values are used, they must be enclosed in double quotes, e.g. "02/02/2018 08:00:00"
Version: 1.3.6  |   Created: 2018-10-23  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 95
Retrieve PVS boot times for a given period from event logs and show them with overall statistics such as fastest, slowest and average boot times. Can help find performance issues. Ensure that each PVS server's stream service has event logging enabled
Arguments:
Last - report on events created in the last x hours/days/weeks, e.g. 7d for last 7 days or 4w for 4 weeks (default is 7 days)
Version: 1.5.7  |   Created: 2018-10-17  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 164
Query or change the logging levels in Citrix StoreFront.
Enable more verbose logging when troubleshooting potential StoreFront issues but turn the level back to off or error when finished to reduce the impact on CPU and free disk space.
Arguments:
Cluster - ff set to true then all servers in the cluster will be discovered and reported/operated on rather than just the selected computer (default is false)
Trace Level - specify one of: 'Off', 'Error','Warning','Info','Verbose' or leave empty to query rather than change the current settings (default is empty)
Version: 1.4.14  |   Created: 2018-10-17  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 70
Disconnect or logoff sessions on the selected computer(s) which have been idle in excess of a given period, specified in minutes.
Arguments:
Idle Period - the time in minutes after which a disconnected session will be logged off or disconnected depending on the value for the "Logoff" argument (default is 30 minutes)
Logoff - if true, sessions idle in excess of the idle period will be logged off, otherwise they will be disconnected (default is false so sessions will be disconnected)
Version: 1.5.7  |   Created: 2018-10-13  |   Modified: 2018-11-23  |   Creator: Guy Leech  |   Downloads: 338
Cancels any "Message and Logoff" SBAs which are still running on the selected computer(s) by finding the associated PowerShell process and terminating it.
Arguments:
Cancellation Message - A message to display to the users so they can be informed that they will not be logged off (default is no mesage)
Version: 1.3.3  |   Created: 2018-10-12  |   Modified: 2018-11-23  |   Creator: Guy Leech  |   Downloads: 44
Send a message to all connected sessions and then log them all off after a specified amount of time. The message can be repeated at a specified interval if required.
For instance, a delay of 15 minutes can be set and the users messaged every 5 minutes with the text specified in the "Message Text" argument.
When the configured script timeout of 60 seconds is reached, an error will be displayed but the script will keep running. If you need to cancel the logoff once the script has timed out, run the "Cancel Logoffs" SBA for the same computer(s)
Arguments:
Message Text - The text of the message to display to all connected users on the selected computer(s)
Delay Before Logoff - The period in minutes from when the script is invoked to when all users will be automatically logged off by the SBA
Message Every - how often, in minutes, the same message is displayed to the remaining users. Specify zero or a blank value to not repeat the message after the initial display
Version: 1.3.13  |   Created: 2018-10-12  |   Modified: 2018-11-23  |   Creator: Guy Leech  |   Downloads: 169
Show user name, logon and logoff times of all users who have logged off, or been logged off, the selected computer(s) in the last x hours where x is an argument defaulting to 48. Useful to be able to spot if many users were logged off at a specific time.
Arguments:
Hours back to search - default is 48
User - optional user name to search for otherwise all users will be displayed
Version: 1.5.7  |   Created: 2018-07-18  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 161
Use quser.exe to find disconnected sessions on the chosen computer and order on the most recently disconnected, showing the user's logon time too.
Arguments:
Hours Back to Check - how far back to look for disconnected sessions so those disconnected before this time will not be included (default is 24 hours)
Version: 1.6.19  |   Created: 2018-07-18  |   Modified: 2018-11-21  |   Creator: Guy Leech  |   Downloads: 113
Get a detailed overview of the most recent logon process for a specific user. This script queries the event log for every major event that relates to the logon process. Use this action to track down which phase is responsible for delays during the logon process. Uses WMI to retrieve pre-Windows logon phase data from Citrix so does not use OData and therefore does not need credentials
Version: 16.30.171  |   Created: 2018-07-02  |   Modified: 2023-03-22  |   Creator: Guy Leech  |   Downloads: 41767
Reset registry key where WEM registry settings are stored.
Version: 1.2.25  |   Created: 2017-07-11  |   Modified: 2019-05-20  |   Creator: timriegler  |   Downloads: 54
The script runs for 20 seconds and measures (once every 2 seconds) the ICA RTT and network latency of the relevant session.
The output shows the session info (username, device name/IP, session name/ID) and 10 reads (once every 2 seconds) of the session's ICA RTT and network latency in seconds.
Version: 2.2.39  |   Created: 2017-03-20  |   Modified: 2017-04-23  |   Creator: Gadi Feldman  |   Downloads: 1106
Resets Citrix Receiver in VDA session. Requires cleanup.exe and selfservice.exe. It can take a little over a minute to run.
* Resetting will delete all apps, desktops, accounts, and configurations, and return Receiver to default settings. It will also close all active sessions. Only reset Citrix Receiver to resolve serious problems.
Version: 2.2.6  |   Created: 2016-08-11  |   Modified: 2017-02-26  |   Creator: David Ott  |   Downloads: 163
This script measures the bandwidth of a given active HDX session, and breaks down the bandwidth consumption into the most useable ICA virtual channels. The output shows the bandwidth usage in kbps (kilobits per second) of each virtual channel and the total session. This version shows only the session output (download), and not the upload.
Version: 1.2.27  |   Created: 2016-06-26  |   Modified: 2016-06-27  |   Creator: Matan Nataf  |   Downloads: 1538
Use this script based action to pull detailed information on the cache usage on Citrix XenDesktop 7.9 and above.
Version: 1.0.1  |   Created: 2016-05-31  |   Modified: 2016-05-31  |   Creator: Andrew Morgan  |   Downloads: 640
Checks the computer registry and displays current ICA Listener binding information - if ICA is enabled, displays the adapters to which ICA is bound
Version: 2.0.3  |   Created: 2016-05-03  |   Modified: 2018-11-05  |   Creator: Trentent Tye  |   Downloads: 147
Gets detailed information on Citrix subcomponents
Version: 1.8.24  |   Created: 2016-04-29  |   Modified: 2017-01-31  |   Creator: Andreas Moe  |   Downloads: 359
The following script runs a report against the PVS farm using the latest PowerShell 7.7 and above PowerShell cmdlets.
Version: 1.0.9  |   Created: 2016-04-13  |   Modified: 2016-04-22  |   Creator: Andrew Morgan  |   Downloads: 305
The script runs on the ControlUp Console computer and initiates an HDX connection against one or more XenApp servers in order to check the server's health. The script does not perform any actual login activity to the targeted XenApp server.
Version: 1.12.26  |   Created: 2016-03-13  |   Modified: 2016-03-16  |   Creator: Matan Nataf  |   Downloads: 1120
This script will check the target computer to see if Citrix's list of recommended Microsoft patches are installed for Windows Server 2012/2012 R2. This helps with Best Practice baselining.
Version: 3.2.6  |   Created: 2015-10-13  |   Modified: 2019-09-24  |   Creator: Zeev Eisenberg  |   Downloads: 881
Gets the PVS target device retries count via the "Mcli-Get DeviceStatus" PowerShell command. This action should be executed on a PVS server with the MCLI PowerShell snap-in installed.
Version: 1.2.4  |   Created: 2015-08-09  |   Modified: 2015-08-10  |   Creator: Yoni Avital  |   Downloads: 548
A Script to obtain the Pool Non Paged Bytes which ultimately is an indication of the amount of Cache in Ram used by Citrix Provisioning Services.
This script will output the amount of PVS Ram Cache in use. This is done by enumarating the amount of Pool nonPaged Bytes in use, which is a measure of the RamCache. Action should be taken if this figure is close to the amount allocated within PVS. The script also supports examining the PVS configuration of disk cache only.
Version: 2.12.18  |   Created: 2015-03-29  |   Modified: 2015-04-14  |   Creator: Matthew Nichols  |   Downloads: 1209
This disables DEP which is recommended by Citrix.
Version: 1.0.1  |   Created: 2014-08-27  |   Modified: 2014-08-27  |   Creator: jjordan  |   Downloads: 332
Adds the selected XenApp server(s) to a Worker Group
Version: 3.2.13  |   Created: 2013-12-30  |   Modified: 2014-02-18  |   Creator: Zeev Eisenberg  |   Downloads: 197
Disable XenDesktop maintenance mode for the selected computer(s)
Version: 9.10.32  |   Created: 2013-11-24  |   Modified: 2023-02-23  |   Creator: Zeev Eisenberg  |   Downloads: 1407
Enable XenDesktop maintenance mode for the selected computer(s). Highlight the target VMs, but run it on the broker for the VMs.
Version: 8.0.11  |   Created: 2013-11-24  |   Modified: 2023-02-23  |   Creator: Zeev Eisenberg  |   Downloads: 1200
Remove selected server(s) from the list of servers on which a selected application is published
Version: 2.0.2  |   Created: 2013-11-24  |   Modified: 2014-02-20  |   Creator: Zeev Eisenberg  |   Downloads: 166
Enable XenApp Logon to the selected server
Version: 2.0.2  |   Created: 2013-11-24  |   Modified: 2014-02-19  |   Creator: Zeev Eisenberg  |   Downloads: 539
Disable XenApp Logon to the selected server. This state only persists until the next reboot.
Version: 2.0.4  |   Created: 2013-11-24  |   Modified: 2014-02-19  |   Creator: Zeev Eisenberg  |   Downloads: 570
Changes the XenApp Logon Mode for the selected server. Please enter one of the following states: AllowLogOns, ProhibitNewLogOnsUntilRestart, ProhibitNewLogOns, ProhibitLogOns
Version: 4.1.7  |   Created: 2013-11-21  |   Modified: 2017-11-14  |   Creator: Zeev Eisenberg  |   Downloads: 569
Removes the selected XenApp server(s) from a Worker Group
Version: 2.0.3  |   Created: 2013-11-21  |   Modified: 2014-02-20  |   Creator: Zeev Eisenberg  |   Downloads: 178