#
Changelog
#
Recent Updates
Changelog for each script will be provided on its documentation page where relevant.
- Integrated CleanMgr registry preparation for selected VolumeCaches and invoked CleanMgr (/sagerun:1).
- Configured and triggered Storage Sense to remove temporary files and locally cached OneDrive content.
- Added DISM component store cleanup (StartComponentCleanup) with explicit exit-code logging.
- Added removal of user-specific temporary files (%USERPROFILE%\AppData\Local\Temp).
- Enhanced event log cleanup:
- Improved error handling for individual logs to ensure the script continues processing other logs.
- Added removal of old user profiles from C:\Users based on retention days ($userProfileRetentionDays).
- Centralised logging with Start-Transcript and Custom-WriteLog; log file located at $env:TEMP<scriptName>.log.
- Improved error handling so individual step failures are logged as warnings and the script continues.
- Exposed configuration variables for operational tuning:
- $logsToClear: List of event logs to process.
- Added initialisation of $freeSpaceGB to capture baseline free space before cleanup, ensuring accurate space-recovered reporting.
- Validated archive directory existence before appending or moving logs.
- Appended new logs to existing archive files or created new archive files as needed.
- Executed Disk Cleanup silently using the /VERYLOWDISK argument.
- Documented exit codes:
- 0 = Success
- 1 = General failure (useful for external monitoring; individual step failures do not necessarily change the final exit code unless a fatal condition is detected).
#
Version History
See individual script headers for detailed version history and changelog information.