Tag: vmware

(43 Scripts)

<< Back to Script Library
Enables provisioning on a Horizon RDS Farm

Can be used as an automated or manual action to enable provisioning for a Horizon RDS Farm

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'
Version: 2.1.8  •   Created: 2023-04-06  •   Modified: 2023-05-23
Disables provisioning on a Horizon RDS Farm

Can be used as an automated or manual action to disable provisioning for a Horizon RDS Farm

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'
Version: 2.1.9  •   Created: 2023-04-06  •   Modified: 2023-05-23
Enables a Horizon RDS Server

Can be used as an automated or manual action to enableHorizon RDS Server after troubleshooting or 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'
Version: 2.0.3  •   Created: 2023-04-06  •   Modified: 2023-05-23
Disables a Horizon RDS Server

Can be used as an automated or manual action to disable Horizon RDS Server for troubleshooting or 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'
Version: 2.0.12  •   Created: 2023-04-06  •   Modified: 2023-05-23
The script uses PowerCLI Update-Tools with the -NoReboot flag to update VMware Client tools. The update command -NoReboot flag should prevent the target guest machine rebooting. However, the VM might still reboot after updating VMware Tools, depending on the currently installed VMware Tools version, the VMware Tools version to which you want to upgrade, and the vCenter Center/ESX versions.
ControlUp Console may disconnect from the target VM's agent while updating the tools due to the NIC drivers updating.
Version: 1.3.9  •   Created: 2021-01-11  •   Modified: 2021-01-18
This script uses the Powershell module of the Horizon Session Recording fling to stop the recording of a BLAST session of a user.
Requirements: Horizon Session Recording 2.2.0 or higher
Link: https://flings.vmware.com/horizon-session-recording
Version: 1.3.10  •   Created: 2020-11-05  •   Modified: 2020-11-17
This script uses the Powershell module of the Horizon Session Recording fling to start the recording of a BLAST session of a user.
Requirements: Horizon Session Recording 2.2.0 or higher
Link: https://flings.vmware.com/horizon-session-recording
Version: 1.3.12  •   Created: 2020-11-05  •   Modified: 2020-11-17
Uses the Horizon REST api's to pull all Error, Warning and Audit_Fail 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_error_log.csv

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 Horizon Credentials to be set for the account running the scipt on the target machine, these need to be created using the 'Create credentials for Horizon scripts' Script Action
Version: 4.3.12  •   Created: 2020-08-27  •   Modified: 2023-10-25
Perform health check analysis of VMware App Volumes on an end-point, reporting issues that may be or were user impacting. Also shows disk mounts and durations for App Volumes mounted for current user sessions.
Version: 3.8.16  •   Created: 2020-06-30  •   Modified: 2020-10-23
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
Version: 4.8.21  •   Created: 2020-04-28  •   Modified: 2023-10-25
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.
Version: 2.1.4  •   Created: 2020-04-02  •   Modified: 2023-11-24
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
Version: 1.4.7  •   Created: 2020-02-26  •   Modified: 2020-08-05
Disables a Horizon Desktop pool

Can be used as an automated or manual action to disable 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'
Version: 4.6.27  •   Created: 2020-02-02  •   Modified: 2023-05-24
This script Recovers a Horizon View Instant Clone using the VMware Horizon api's. You can use this to 'rebuild' an Instant Clone if there is an issue with the machine.
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.
Version: 3.6.8  •   Created: 2020-01-11  •   Modified: 2023-11-24
This script retreives the administrative users and groups in a Horizon View environment.
You can this script to make sure administrators have the right permissions in Horizon View?
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.
Version: 3.5.9  •   Created: 2020-01-11  •   Modified: 2020-02-04
This script connects to all pod's in a Cloud Pod Architecture(CPA) or only the local one if CPA hasn't been initialized and pulls all health information for configured UAG's.
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.

Note: Requires PowerCLI 11.4 or higher and Horizon 7.10 or higher
Version: 4.6.9  •   Created: 2020-01-09  •   Modified: 2020-09-23
Changes the amount VDI desktops in a desktop pool. Use UP_FRONT or ON_DEMAND for the Provisioningtype depending if you want to provision all desktops up front. If UP_FRONT is used minNumberOfMachines and numberOfSpareMachines will be ignored.

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'
Version: 4.7.13  •   Created: 2020-01-09  •   Modified: 2023-11-24
Changes the amount of RDS hosts in a Horizon Farm.

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'
Version: 1.5.6  •   Created: 2020-01-09  •   Modified: 2020-02-11
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'
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'
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'
Version: 3.13.29  •   Created: 2019-08-22  •   Modified: 2023-05-24
Uses the VMware Horizon API via a Connection Server to query the events database for a given number of days back which contains events summarising the daily use and draws a chart with the data.

Requires the VMware PowerCLI PowerShell modules (specifically VMware.VimAutomation.HorizonView) which can be obtained from https://developer.vmware.com/tool/vmware-powercli
Version: 2.1.47  •   Created: 2019-08-15  •   Modified: 2023-07-30
This script will change the resource allocation of a given vSphere VM. By default, the allocation is increased one 'SharesLevel' for CPU, HDD, Memory or all three.
If the SharesLevel for a resource is 'Custom' this will not be changed. ALL hard disks will be set to a new SharesLevel based on the current level of the FIRST disk. Example, script is set to Increase level for All resources:
CPU SharesLevel 'Normal' ---> CPU ShareLevel 'High'
Memory SharesLevel 'Custom' ---> Memory SharesLevel 'Custom'
FIRST HDD SharesLevel 'Low', SECOND HDD SharesLevel 'Normal' ---> ALL HDD SharesLevel 'Normal'
Version: 1.0.2  •   Created: 2019-03-19  •   Modified: 2019-03-19
Placing a host in Maintenance will migrate the powerred on VMs to other hosts in the cluster. If the Evacuate switch is passed all offline machines a migrated too.
This script will only place a host in Maintenance if the cluster it is part of is DRSFullyAutomated.
If the host uses a VSAN and the PowerCLI version is high enough the default VsanEvacuationMode setting will be used. This is only supported with PowerCLI 6 or higher.
Version: 1.4.10  •   Created: 2019-02-21  •   Modified: 2019-03-31
This script will migrate the ALL the VM (local) disks to the specified datastore. If all the disks are already on the target datastore the script will exit.
Version: 1.2.6  •   Created: 2019-02-10  •   Modified: 2019-05-13
vmware 29
This script gets the files in a selected VMware vSphere Datastore, filtered by the last time they were modified and size. This is useful for researching disk space usage, specifically when you're intereseted in finding out which files consume significant storage space.
Version: 1.16.49  •   Created: 2019-01-16  •   Modified: 2019-04-28
This script will migrate a vSphere VM to the selected host.
Version: 1.2.11  •   Created: 2019-01-15  •   Modified: 2019-05-13
vmware 61
This script will gracefully restart the selected vSphere VM Guest OS using VMWare Client Tools.
VMware PowerCLI needs to be installed on the machine running the script.
Version: 4.5.20  •   Created: 2019-01-15  •   Modified: 2022-12-14
vmware 494
This script resets the power state for the selected vSphere VM.
VMware PowerCLI needs to be installed on the machine running the script.
Version: 3.2.14  •   Created: 2019-01-15  •   Modified: 2022-12-14
vmware 219
This script will power off the selected vSphere VM
Version: 1.2.10  •   Created: 2019-01-15  •   Modified: 2019-05-01
This script will power on a selected vSphere VM
Version: 2.2.15  •   Created: 2019-01-15  •   Modified: 2022-12-14
This script will gracefully shut down the VM Guest OS using VMWare Client Tools.
A check is done to see of the machine has powered off. The timeout for this check is 180 seconds.
Version: 1.2.24  •   Created: 2019-01-15  •   Modified: 2019-05-01
vmware 84
Installs PowerCLI moduleand the required packageprovider NuGet for working with VMware and Powershell for All Users. Also changes the CEIP settings to not send data and Invalid Certificate handling to warn by default.
- Used module Install-Module requires Powershell 5.0 minimum!
- The script will overwrite any existing PowerCLI modules
- MSI based modules must be uninstalled first
Version: 2.1.16  •   Created: 2018-11-26  •   Modified: 2020-06-02
This script will retreive the physical network adapters of the hypervisor machine and output their details
Version: 1.1.10  •   Created: 2018-11-25  •   Modified: 2019-02-10
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: 20.32.178  •   Created: 2018-07-02  •   Modified: 2024-03-24
This script retrieves the snapshots from the selected VMware virtual machine(s). The script requires VMware PowerCLI to be installed on the computer the console runs on.
Version: 9.13.33  •   Created: 2016-12-21  •   Modified: 2019-03-31
This script removes ALL the snapshots from the selected VMware virtual machine(s). The script requires VMware PowerCLI to be installed on the computer the console runs on.
Version: 5.9.22  •   Created: 2016-12-07  •   Modified: 2019-03-31
This script removes a named snapshot from the selected VMware virtual machine(s). If the name is left blank it will remove the latest snapshot. The script requires VMware PowerCLI to be installed on the computer the console runs on.
Version: 6.13.35  •   Created: 2016-12-07  •   Modified: 2019-03-31
Creates a snapshot of the selected VMware virtual machine(s). Datetime will be added to the default snapshot name 'ControlUpSnapshot' if this is used. The script requires VMware PowerCLI to be installed on the computer the console runs on.
Version: 9.18.42  •   Created: 2016-12-06  •   Modified: 2019-03-31
This script will launch a remote console session in your default browser for a vSphere/ESXi VM. This is mainly useful for vSphere 5.x users.
This script requires PowerCLI v5.0 or greater, Adobe Flash, and the vmware-vmrc browser plugin in order to function.
Version: 5.10.13  •   Created: 2015-03-23  •   Modified: 2018-12-18
Disable Horizon View Maintenance Mode for the selected computer(s).
Version: 3.3.12  •   Created: 2014-11-26  •   Modified: 2022-06-13
Enable Horizon View Maintenance Mode for the selected computer(s).
Version: 3.3.12  •   Created: 2014-11-26  •   Modified: 2022-06-13
Gracefully restart a VMware VM using PowerCLI through the vCenter.
Version: 4.4.12  •   Created: 2014-01-07  •   Modified: 2018-12-06