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’
Run WinDirStat (https://windirstat.net/) to analyze the usage of a drive.
If executed for a Logical drive that will be used.
If executed on a computer or session will be run for ALL Drives on that computer
For any file on the target computer for which the user provides the full path, displays a list of processes with open handles to the file. This is useful for determining which process is locking the file, preventing its deletion or editing in another program.
The action makes use of Sysinternals handle.exe, which is downloaded, extracted into a temporary location and deleted after completion.
This script is used to clean up a disk by deleting the content of directories which are known to accumulate large amounts of useless data. By default, the following folders are emptied of files (if they exist):
%systemroot%Downloaded Program Files
%allusersprofile%MicrosoftWindows DefenderDefinition Updates
Extra folders to be cleaned and specific files to be removed can be added when running the script.
Option: Run CLEANMGR with all options set, and delete Volume Shadow Copies
Option: Run DISM if CLEANMGR was supposed to run but is not available
Note: The CLEANMGR option and DISM fallback remove installers of updates and old Windows versions. If either of these has been run, IT IS NOT POSSIBLE TO UNINSTALL UPDATES OR REVERT TO AN OLDER WINDOWS BUILD!