Script Library

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

<< Back to Script Library

Tag: disk

(11 Scripts)
Reports or changes the host disk caching mode for the OS disk on an Azure VM.
With disk caching enabled, VMs can achieve higher levels of performance.
The VM does not need to be powered off and the change will have no noticeable effect on user's currently using that VM.
Version: 1.0.11  |   Created: 2023-11-28  |   Modified: 2024-01-26  |   Creator: Guy Leech  |   Downloads: 3
Send events to the ServiceNow Events Management interface for tracking free space events
Version: 1.31.36  |   Created: 2023-11-24  |   Modified: 2024-02-27  |   Creator: Trentent Tye  |   Downloads: 2
Configures the Optimize Drives service so that FSLogix Disk Compaction will function.

This SBA can be executed manually or used with a trigger pack to automate healing of this misconfiguration. More information is available here:
https://support.controlup.com/docs/trigger-packs
Version: 2.2.5  |   Created: 2023-04-13  |   Modified: 2023-04-21  |   Creator: Trentent Tye  |   Downloads: 63
Check Profile Sizes examines user profiles for all or selected user accounts on the target machine, grouping the results by file type, using the extension.

For each group of files, if the size of the group exceeds a threshold (default 15% of the total profile size) the individual files are listed, sorted by path or by size (descending) and showing the actual file size in bytes.

To keep the output reasonably short, a threshold is set on the number of files shown individually per are listed by path (default 6) - beyond this, files are summarized by folder (order by count of files, descending).

Arguments:
ThresholdPercentToExpand (default: 15) - the threshold percent of the total profile size at which a file-extension group is listed.
SamAccountNameList (default: All) - the list of account names to be reported (comma-separated, any leading or trailing spaces will be trimmed). If set to All, the script will include local user and Active Directory user accounts.
SortBy (default: Size) - must be set to Size (individual files are listed by size, descending) or Path (individual files are listed by full path, ascending).
PreSummarySize (default: 6) - the number of files that will be listed individually (by group, according to the configured sort order) before the script switches to reporting files grouped by folder.
Version: 1.2.17  |   Created: 2023-03-08  |   Modified: 2023-03-23  |   Creator: Bill Powell  |   Downloads: 192
Show FSLogix currently mounted volume details and cross reference to FSLogix session information in the registry.
Version: 2.2.25  |   Created: 2022-08-17  |   Modified: 2022-12-04  |   Creator: Guy Leech  |   Downloads: 430
Change the type of disk assigned to the Azure VM. Valid disk types are:

Standard_LRS
Premium_LRS
StandardSSD_LRS
UltraSSD_LRS
Premium_ZRS
StandardSSD_ZRS

Note that costs of this VM once updated could be very different.
Version: 2.3.5  |   Created: 2022-01-19  |   Modified: 2022-03-17  |   Creator: Guy Leech  |   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: 34
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
Version: 1.10.35  |   Created: 2019-03-13  |   Modified: 2019-03-29  |   Creator: Marcel.Calef  |   Downloads: 526
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.
Version: 1.3.3  |   Created: 2018-12-11  |   Modified: 2019-04-03  |   Creator: Guy Leech  |   Downloads: 161
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.
Version: 1.3.3  |   Created: 2018-12-11  |   Modified: 2019-04-03  |   Creator: Guy Leech  |   Downloads: 163
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
%systemroot%Temp
%systemdrive%Windows.old
%systemdrive%Temp
%systemdrive%MSOCacheAll Users
%allusersprofile%AdobeSetup
%allusersprofile%MicrosoftWindows DefenderDefinition Updates
%allusersprofile%MicrosoftWindows DefenderScans
%allusersprofile%MicrosoftWindowsWER
%SystemRoot%memory.dmp
%SystemRoot%Minidump.dmp

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!
Version: 2.6.34  |   Created: 2018-12-02  |   Modified: 2020-12-09  |   Creator: Ton de Vreede  |   Downloads: 1310