Script library

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

The script uses udadmin.exe and display the license(s) checked out for the selected username and/or client device. Note that the script is required to run in the Citrix License Server.
WARNING: avoid running the script against multiple sessions simultaneously to prevent significant resource consumption in the Citrix license server.
View Script
Version: 1.19.27  •   Created: 2019-10-03  •   Modified: 2019-10-18
citrix 152
Check the permissions of the records that match the computer name specified and optionally change them so that the computer account for the current AD object for that computer has rights to update the record.
Run on a computer that has the ActiveDirectory PowerShell mdoule installed like a domain controller. Permissions for Domain controller DNS records will not be changed,
Use when machines have been rebuilt and they cannot update their own DNS record because it is owned by the account for the previous build which no longer exists in AD so the current computer does not have permissions when it wants to register the IP address against its own DNS record
NOTE: It is recommended you make a backup of your DNS with the Backup DNS Zone script before running this script with Fix set to Yes.
View Script
Version: 1.1.7  •   Created: 2019-10-03  •   Modified: 2022-10-06
Finds threads over consuming CPU in the selected process and reduces their average CPU consumption based on the agressiveness argument. The higher the agressiveness, the more CPU throttling is performed. The number can be between 1 and 10 including decimal places.
A duration can be set, in minutes or parts there of, for how long the selected process will be monitored/adjusted but if set to 0 then the process will be monitored/adjusted until it exits.

WARNING: This may make interactive applications become sluggish for users if they are targeted
View Script
Version: 1.2.7  •   Created: 2019-10-03  •   Modified: 2019-10-29
699
Backup the specified DNS zone(s) to file using dnscmd.exe. The backup is stored in a subfolder created in system32dns
The default 'Zone name or regex' setting of * will backup all Zones on the DNS server.
A REGEX like ^backmeup$ will only backup a zone named 'backmeup'
View Script
Version: 1.2.14  •   Created: 2019-09-27  •   Modified: 2022-10-06
Enables a Horizon Desktop pool

Can be used as an automated or manual action to enable a Horizon Desktop pool for planned maintenance.

This action should be executed against a Horizon endpoint machine (one which has the HZ Primary Connection Server column populated in ControlUp Console) which is part of the relevant Desktop Pool. The script uses the target machine to determine the connection server address and the Desktop Pool name, and is executed on the machine running ControlUp Console.

This script requires VMWare PowerCLI to be installed on the machine running the script.

PowerCLI can be installed through PowerShell (PowerShell version 5 or higher required) by running the command 'Install-Module VMWare.PowerCLI -Force -AllowCLobber -Scope AllUsers'
View Script
Version: 5.11.55  •   Created: 2019-08-22  •   Modified: 2023-05-24
Enables VMware Horizon Virtual Desktop pool provisioning

Can be used as a manual or automated action to disable Horizon View Virtual Desktop pool provisioning if a resource shortage is detected. This action should be executed against a Horizon endpoint machine (one which has the HZ Primary Connection Server column populated in ControlUp Console) which is part of the relevant Desktop Pool. The script uses the target machine to determine the connection server address and the Desktop Pool name, and is executed on the machine running ControlUp Console.

This script requires VMWare PowerCLI module to be installed on the machine running the script.
PowerCLI can be installed through PowerShell (PowerShell version 5 or higher required) by running the command 'Install-Module VMWare.PowerCLI -Force -AllowCLobber -Scope AllUsers'
View Script
Version: 3.12.23  •   Created: 2019-08-22  •   Modified: 2023-05-24
Disables VMware Horizon Virtual Desktop pool provisioning

Can be used as a manual or automated action to disable Horizon View Virtual Desktop pool provisioning if a resource shortage is detected. This action should be executed against a Horizon endpoint machine (one which has the HZ Primary Connection Server column populated in ControlUp Console) which is part of the relevant Desktop Pool. The script uses the target machine to determine the connection server address and the Desktop Pool name, and is executed on the machine running ControlUp Console.

This script requires VMWare PowerCLI module to be installed on the machine running the script.
PowerCLI can be installed through PowerShell (PowerShell version 5 or higher required) by running the command 'Install-Module VMWare.PowerCLI -Force -AllowCLobber -Scope AllUsers'
View Script
Version: 3.13.29  •   Created: 2019-08-22  •   Modified: 2023-05-24
Take Horizon View machine out of Maintenance.
Can be used as an Automated action to remove a machine from maintenance after a plannend maintenance window
This script requires VMWare PowerCLI and the Vmware.Hv.Helper module to be installed on the machine running the script.
PowerCLI can be installed through PowerShell (PowerShell version 5 or higher required) by running the command 'Install-Module VMWare.PowerCLI -Force -AllowCLobber -Scope AllUsers'
Vmware.Hv.Helper can be installed using the 'Prepare machine for Horizon View scripts' script. It can also be found on Github (see LINK). Download the module and place it in your systemdrive Program FilesWindowsPowerShellModules folder
View Script
Version: 2.6.13  •   Created: 2019-08-22  •   Modified: 2023-11-24
69
Place Horizon View machine in Maintenance
Can be used as an Automated action to place a machine in maintenance if counters indicate there is an issue with the machine or for planned maintenance windows.
This script requires VMWare PowerCLI and the Vmware.Hv.Helper module to be installed on the machine running the script.
PowerCLI can be installed through PowerShell (PowerShell version 5 or higher required) by running the command 'Install-Module VMWare.PowerCLI -Force -AllowCLobber -Scope AllUsers'
Vmware.Hv.Helper can be installed using the 'Prepare machine for Horizon View scripts' script. It can also be found on Github (see LINK). Download the module and place it in your systemdrive Program FilesWindowsPowerShellModules folder
View Script
Version: 1.5.12  •   Created: 2019-08-22  •   Modified: 2019-12-03
31
View Script
Version: 1.0.1  •   Created: 2019-07-30  •   Modified: 2019-07-30
801
For end-points with Ivanti UWM agents and configurations installed, retrieve and show details of the configurations installed for each installed agent, whether installed via MSI or a native configuration.
Will also show details of any pending install/uninstall tasks for the Deployment Agent.
View Script
Version: 2.3.7  •   Created: 2019-07-28  •   Modified: 2019-08-14
36
For end-points with Ivanti UWM agents and configurations installed, retrieve and show details of the configurations installed for each installed agent, whether installed via MSI or a native configuration.
Will also show details of any pending install/uninstall tasks for the Deployment Agent.
View Script
Version: 2.3.6  •   Created: 2019-07-28  •   Modified: 2019-08-14
76
For end-points with Ivanti UWM agents and configurations installed, retrieve and show details of the configurations installed for each installed agent, whether installed via MSI or a native configuration.
Will also show details of any pending install/uninstall tasks for the Deployment Agent.
View Script
Version: 2.3.8  •   Created: 2019-07-28  •   Modified: 2019-08-14
44
This Script Action runs a Citrix ADC, previously known as NetScaler, High Availability (HA) healthcheck to ensure no errors occured for the HA sync and both HA nodes are UP and running.
View Script
Version: 2.7.11  •   Created: 2019-07-27  •   Modified: 2019-08-26
Completely empty or trim process working sets to a specific size in order to make more memory available for other processes/users. The memory is paged oiut and pages of this will be paged back in if the process needs it.

WARNING. If too many processes are trimmed too frequently, performance can suffer due to hard page faults so use with caution
View Script
Version: 1.6.9  •   Created: 2019-07-25  •   Modified: 2019-08-04
805
Adjusts the process priority in a users session based on its state.
Active = Normal
Idle / Disconnect = Process Priority Floor
View Script
Version: 1.5.8  •   Created: 2019-07-25  •   Modified: 2019-08-04
843
Leverage PowerShell commands as described in :
https://docs.microsoft.com/en-us/powershell/module/storage/resize-partition?view=win10-ps
to extend a logical disk to the maximum available size
View Script
Version: 1.0.5  •   Created: 2019-07-03  •   Modified: 2019-07-03
FreeSpace 232
Set the maximum working set size for a process such that it cannot consume more than that amount of memory. Gives the ability to set a memory limit on a process, such as one with a known memory leak, so that it cannot consume more than the maximum memory specified via the parameter. Additional memory allocations will be allowed by the OS paging out some of the existing working set, generally the least recently used.
View Script
Version: 1.1.2  •   Created: 2019-06-10  •   Modified: 2019-12-12
When a Computer was previously managed by another organization
it will not accept connections form another (new) organization.
To resolve this, the script will stop a running agent
and clear the registry settings locking a running agent to an Organization.
This script will also clear any previous ControlUp Agent customizations
The script will restart the ControlUp Service at the end
Documentation:
https://support.controlup.com/hc/en-us/articles/207234285-Computer-already-belongs-to-another-ControlUp-organization
Limitation: Target computers need to be resolved by hostname and the user executing the script must be a local admin in that computer
Due to multiple remote actions, this script might take up to 2 minutes to execute
View Script
Version: 2.6.15  •   Created: 2019-06-05  •   Modified: 2019-07-31
80
Queries the WMI Event Log to show details for a WMI provider running within a WMIPRVSE process
View Script
Version: 2.2.5  •   Created: 2019-05-24  •   Modified: 2020-06-07
  • 11
  • of 23