Soji (Disk Cleanup Utility)
Summary
Soji is a smart yet straightforward disk cleanup utility designed to enhance system cleanliness on Windows. It utilizes both native System.IO file and directory management along with COM references to the deprecated cleanmgr tool.
This document provides a guide on creating the Soji disk cleanup Task in CW RMM. The task is versatile and can serve as an Autofix/Automation Task alongside Monitors or Intelligent Alerts. When employed as an Autofix, the task executes the tool with the --All argument.
Please reference Soji for argument usage.
Sample Run
Clean all fixed drives with all available cleaners:

Clean the C and F drives:

Clean all fixed drives and read back the file JSON report in PowerShell:

Dependencies
User Parameters
| Name | Example | Required | Default | Description |
|---|---|---|---|---|
| Arguments | --all | Yes | --all | Please reference Soji for argument usage. |
Note: Arguments are case sensitive.
Task Setup Path
Tasks Path: AUTOMATION ➞ Tasks
Task Type: Script Editor
Task Creation
Description
- Name:
Soji (Disk Cleanup Utility) - Description:
Soji is an intelligent yet simple disk cleanup utility that uses both native System.IO file and directory management and COM references to the deprecated cleanmgr tool to tidy up one or more volumes on a Windows system.
https://content.provaltech.com/docs/c762e174-5262-44b9-a3e9-97ca9ff94afc/
- Category:
Maintenance

Parameters
| Parameter Name | Required Field | Parameter Type | Default Value | Value |
|---|---|---|---|---|
| Arguments | Enabled | Text String | Enabled | --all |
Arguments:


Script Editor
Step 1: Row -> PowerShell script
- Use Generative AI Assist for script creation:
False - Expected time of script execution in seconds:
1800 - Operating System:
Windows - Continue on Failure:
False - Run as:
System - PowerShell Script Editor:

Step 2: Row -> Script Log
- Script Log Message:
%Output% - Operating System:
Windows - Continue on Failure:
False
Completed Script

Output
- Script Log
Changelog
2026-03-23
- Updated .Net8 Desktop Runtime installation logic to install the latest available version.
- Structural changes in task
- Document modifications.
2025-04-10
- Initial version of the document