Script Library

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

<< Back to Script Library

Tag: free space

(8 Scripts)
Send events to the ServiceNow Events Management interface for tracking free space events
Version: 1.31.35  |   Created: 2023-11-24  |   Modified: 2024-01-26  |   Creator: Trentent Tye  |   Downloads: 8
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
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
Version: 2.3.10  |   Created: 2020-03-19  |   Modified: 2020-03-30  |   Creator: Ton de Vreede  |   Downloads: 68
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
Version: 1.2.7  |   Created: 2020-03-17  |   Modified: 2020-03-19  |   Creator: Ton de Vreede  |   Downloads: 121
Run WinDirStat ( 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
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
%systemdrive%MSOCacheAll Users
%allusersprofile%MicrosoftWindows DefenderDefinition Updates
%allusersprofile%MicrosoftWindows DefenderScans

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
Show files over a specified size which have been modified within a given number of days, sorted either by age or size. The starting folder for the search can also be specified.
Use it to find large and/or recently modified files which are impacting on free disk space on a given partition.
Starting Folder - the local drive/folder on the selected computer where the recursive search will start from (default is C:)
Size Over - include files whose size exceeds this value which can be specifid in KB, MB or GB, e.g. 250MB (default is 100MB)
Last Write Within - include files last written to within a given number of days (default is 30)
Sort By - either size or age (default is size)
Version: 1.4.10  |   Created: 2018-07-22  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 425
Show folders consuming the largest amounts of disk space. Helps you to find which folders are impacting on free disk space on a given drive/folder.
Folder - the starting drive/folder (default is c:)
Depth - how many folder levels to descend (default is 10)
Show Top - show the top n folders consuming the most disk space (default is 10)
Last Written Within - only include files last modified within the last n days. Specify a large value such as 3000 if you are not interested in just recently modified files (default is 30)
Version: 1.4.16  |   Created: 2018-07-20  |   Modified: 2018-11-26  |   Creator: Guy Leech  |   Downloads: 480