Script library

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

Uses the Horizon REST api's to pull all admin related events from the Horizon Event database for all pods. If there is no cloud pod setup it will only process the local pod. After pulling the events it will translate the id's for the various objects to names to show the proper names where needed.

Output is displayed in the console but also saved to a default location of c:windowstempCU_Horizon_audit_log.csv
View Script
Version: 4.8.21  •   Created: 2020-04-28  •   Modified: 2023-10-25
Use the IP address or hostname of a machine to VNC to it.
Requires the other device to have VNC server installed as well as the VNC viewer in the console
Validated with RealVNC and TightVNC_2.8. TightVNC_1.3 fails and goes to listen mode
View Script
Version: 1.11.30  •   Created: 2020-04-24  •   Modified: 2020-05-10
VNC 47
This script acts when provisioning gets disabled for linked clones desktop pools because the overcommit ratio is set too low. It will calculate the correct ratio and set it to that.
After changing the ratio it will enable provisioning and when set to true it can also force a rebalance of the datastores.
When using iwth a trigger the Connection Server FQDN and Horizon Pool name need to be configured manually.

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' Or by using the 'Install VMware PowerCLI' script.
Credentials can be set using the 'Prepare machine for Horizon View scripts' script.
View Script
Version: 2.1.4  •   Created: 2020-04-02  •   Modified: 2023-11-24
This script can be used as a quick way to block access to a URL. The provided URLs (comma separated) are placed in a 'ControlUp' section of the HOSTS file, where they are directed to 127.0.0.1. As a result DNS lookup of these URLs always point to home, essentially preventing access to a website unless you know the IP number.
After this the command IPCONFIG /FLUSHDNS is run to clear the DNS cache.
View Script
Version: 1.4.19  •   Created: 2020-03-30  •   Modified: 2020-03-30
This script checks all Basic partitions WITH DRIVE LETTERS to see if there is space availbale for shrinking and/or expansion. The following is also checked:
- OS Version, this must be Windows 8/Server 2012 as a minimum to use the ControlUp partition expansion script
- The Disk Status
View Script
Version: 2.3.10  •   Created: 2020-03-19  •   Modified: 2020-03-30
This script uses standard PowerShell commands to expand the disk of Windows machine. For safety, this script only works if the following conditions are met:
- At least 100Mb of free space available (this needs to be directly AFTER the chosen partition)
- The Disk State must be Healthy
- You must specify a drive letter of the disk to be expanded
View Script
Version: 1.2.7  •   Created: 2020-03-17  •   Modified: 2020-03-19
This script uses CreateScreenshot_Task of an ESXi virtual machine through vCenter. The screenshot is the moved from the datastore folder of the VM to a location of choice.
Screenshots are placed in the virtual machine configuration folder by default. The script moves the screenshot to the desired target folder. For these steps to succeed the account running the script needs the following priviliges:
1. Virtual Machine - Interaction - Create screenshot
2. Datastore - Browse Datastore
3. Datastore - Low level file operations
View Script
Version: 1.4.7  •   Created: 2020-02-26  •   Modified: 2020-08-05
Instruct the IGEL UMS to reboot a client device using the IGEL IMI Rest API.
Note: Given that the common practice for the UMS server is to use the self signed Certificate,
this script will ignore SSL errors
View Script
Version: 1.1.4  •   Created: 2020-02-25  •   Modified: 2020-03-01
44
This script will send a notification to a slack channel using the Incoming Webhooks app when a user logs on
View Script
Version: 2.18.29  •   Created: 2020-02-21  •   Modified: 2022-01-04
This script assigns a user to a Horizon desktop machine. This will only work with dedicated desktop pools.It will receive the connection server fqdn, Desktop pool and machine, login and domain names from the CU Console.

This action should be executed against a Horizon endpoint machine (one which has the HZ Primary Connection Server column populated in ControlUp Console). The script uses the target machine to determine the connection server address, 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: 1.3.5  •   Created: 2020-02-20  •   Modified: 2020-02-25
  • 17
  • of 45