Script Library

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

<< Back to Script Library

Tag: disk space

(9 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: 6
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: 184
The script finds the location of IIS log files and deletes the files older than X amount of days and/or over Y size. By default, the script runs in report-only mode which displays the total size of files by location. In order to enable log file deletion, change the "Report on log files only..." argument to "false".
Version: 1.2.5  |   Created: 2021-01-18  |   Modified: 2021-01-19  |   Creator: Ton de Vreede  |   Downloads: 71
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: 67
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: 115
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
Finds and optionally deletes local user profiles. The user can provide two arguments - the minimum profile age in days and the minimum profile size. The default operation mode is to display the profiles that fit these criteria. When the "Delete" option is set to "true", the script will delete the profiles it found.
Version: 2.4.20  |   Created: 2018-12-26  |   Modified: 2020-06-10  |   Creator: Guy Leech  |   Downloads: 421
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.
Arguments:
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: 419
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.
Arguments:
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: 474