[Webinar] Introducing Employee Experience Optimization for the Work-From-Anywhere Era Watch On-Demand

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

(5 Scripts)
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: 48
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: mc  |   Downloads: 264
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: 506
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: 198
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: 248