Have any questions

Disk Drive Cleanup using PowerShell

Many users are facing the issue of reduced storage space in their C:\ and it is hampering system performance and speed. This PowerShell script will help you to deleted unnecessary/ unwanted files and folders from the system


Function Start-Cleanup {
Automate cleaning up a C:\ drive with low disk space

Cleans the C: drive’s Window Temperary files, Windows SoftwareDistribution folder,
the local users Temperary folder, IIS logs(if applicable) and empties the recycling bin.
All deleted files will go into a log transcript in $env:TEMP. By default this
script leaves files that are newer than 7 days old however this variable can be edited.

PS C:\> .\Start-Cleanup.ps1

Download Full Script

Purpose:This script will help your free up space in your C-drive. It will delete Windows temp files, Software Distribution folder, users’ temp folder, IIS logs and empty the recycle bin folder. Logs will be saved to the path defined in the script
Type:PowerShell Script (ps1) 
Tags:Temporary files, Software Distribution folder, IIS logs (if applicable), Recycle Bin
Reference link: