Script Library

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

<< Back to Script Library

Tag: vsphere

(6 Scripts)
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  |   Creator: Ton de Vreede  |   Downloads: 113
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  |   Creator: Ton de Vreede  |   Downloads: 28
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  |   Creator: Ton de Vreede  |   Downloads: 33
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  |   Creator: Ton de Vreede  |   Downloads: 40
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  |   Creator: Ton de Vreede  |   Downloads: 70
This action allows you to set the amount of CPUs, memory size and hard disk size for a VMware virtual machine.The script requires VMware PowerCLI to be installed on the machine it runs on. ** IF THE VM IS ON IT WILL BE RESTARTED! **
Version: 3.9.29  |   Created: 2016-12-25  |   Modified: 2018-12-18  |   Creator: Ton de Vreede  |   Downloads: 359