Skip to main content

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:

Image1

Clean the C and F drives:

Image2

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

Image3

Dependencies

User Parameters

NameExampleRequiredDefaultDescription
Arguments--allYes--allPlease reference Soji for argument usage.

Note: Arguments are case sensitive.

Task Setup Path

Tasks Path: AUTOMATIONTasks
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

Image4

Parameters

Parameter NameRequired FieldParameter TypeDefault ValueValue
ArgumentsEnabledText StringEnabled--all

Arguments:
Image5

Image6

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:

PowerShell Script

Image7

Step 2: Row -> Script Log

  • Script Log Message: %Output%
  • Operating System: Windows
  • Continue on Failure: False

Image8

Completed Script

Image9

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