Skip to main content

Soji Disk Cleaner

Summary

Stack-Standard Disk Cleanup Utility
This utility uses agnostic content Soji to perform a cleanup of all drives on the target endpoint.

Sample Run

TimeProcessStatusLink
11:55:40 am 13-Jul-22Soji - Disk CleanerSuccess THENprovaltech.com/dan.hicks
11:55:40 am 13-Jul-22Soji - Disk CleanerName,VolumeCacheCount,DirectoryCount,RemainingDirectoryCount,CleanedDirectoryCount,FileCount,RemainingFileCount,CleanedFileCount,EstimatedSpaceToFree,FreedSpace,MissedSpace C:/,8,0,0,0,0,0,0,44347950,44347950,0provaltech.com/dan.hicks
11:55:40 am 13-Jul-22Soji - Disk CleanerComment at THEN step 13provaltech.com/dan.hicks
11:55:40 am 13-Jul-22Soji - Disk CleanerInformational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/204148124820810/GetFiles/SojiLogs/Soji-summary.csv with the new contents from %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs/soji-summary.csv in THEN step 12.provaltech.com/dan.hicks
11:55:39 am 13-Jul-22Soji - Disk CleanerInformational: GetFile command overwrote the server file C:/Kaseya/UserProfiles/204148124820810/GetFiles/SojiLogs/Soji-volumecaches.csv with the new contents from %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs/soji-volumecaches.csv in THEN step 11.provaltech.com/dan.hicks
11:55:39 am 13-Jul-22Soji - Disk CleanerRaw exe Data: [11:55:33 INF] Starting up Soji! [11:55:33 INF] No drive letters passed in. Starting drive detection. [11:55:33 INF] 1 valid drive letter detected. [11:55:33 INF] Getting volume caches for drive C:/ [11:55:33 INF] Skipping return of Active Setup Temp Folders as it is currently using no space. [11:55:33 WRN] Failed to initialize the VolumeCache object at 'SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/VolumeCaches/BranchCache'. Deactivating! [11:55:33 WRN] Releasing the VolumeCache object at 'SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/VolumeCaches/BranchCache'. [11:55:33 WRN] Failed to initialize the VolumeCache object at 'SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/VolumeCaches/Content Indexer Cleaner'. Deactivating! [11:55:33 WRN] Releasing the VolumeCache object at 'SOFTWARE/Microsoft/Windows/CurrentVersion/Explorer/VolumeCaches/Content Indexer Cleaner'. [11:55:33 INF] Skipping return of Diagnostic Data Viewer database files as it is currently...provaltech.com/dan.hicks
11:55:39 am 13-Jul-22Execute Shell command - Get Results to VariableSuccess THENprovaltech.com/dan.hicks
11:55:36 am 13-Jul-22Execute Shell command - Get Results to Variable-0005Executing command in 64-bit shell as system: cd %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner && %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/soji.exe --csv >"c:/provaltech/commandresults-1375566225.txt" 2>&1provaltech.com/dan.hicks
11:55:33 am 13-Jul-22Soji - Disk Cleaner.NET 8.0 Update Results: .NET 8 Desktop Runtime already installed.provaltech.com/dan.hicks
11:55:33 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)Success THENprovaltech.com/dan.hicks
11:55:33 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0016Powershell command complete. Results returned to global variable #global:psresult# and saved in Agent's Documents tab of server.provaltech.com/dan.hicks
11:55:31 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0011Executing 64-bit Powershell command as System: "" -command "%ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/update-net6.ps1" >"c:/provaltech/psoutputtmp.txt"provaltech.com/dan.hicks
11:55:31 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0013Sending output to global variable.provaltech.com/dan.hicks
11:55:31 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0008Custom commands detected as %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/update-net6.ps1provaltech.com/dan.hicks
11:55:31 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0003No Powershell file variable detected.provaltech.com/dan.hicks
11:55:30 am 13-Jul-22Execute Powershell Command (64-bit, Run As System)-0002Powershell is present.provaltech.com/dan.hicks
11:55:25 am 13-Jul-22Execute Powershell CommandSuccess THENprovaltech.com/dan.hicks
11:55:24 am 13-Jul-22Execute Powershell Command-0011Powershell command completed!provaltech.com/dan.hicks
11:55:24 am 13-Jul-22Execute Powershell Command-0011Executing powershell "" -Command "New-Item -Type Directory -Path $env:ProgramData/_automation/AgentProcedure -name SojiDiskCleaner" ""provaltech.com/dan.hicks
11:55:24 am 13-Jul-22Execute Powershell Command-0010Not sending output to variable.provaltech.com/dan.hicks
11:55:24 am 13-Jul-22Execute Powershell Command-0008New command variable is: -Command "New-Item -Type Directory -Path $env:ProgramData/_automation/AgentProcedure -name SojiDiskCleaner"provaltech.com/dan.hicks
11:55:24 am 13-Jul-22Execute Powershell Command-0008Custom commands detected as New-Item -Type Directory -Path $env:ProgramData/_automation/AgentProcedure -name SojiDiskCleanerprovaltech.com/dan.hicks
11:55:23 am 13-Jul-22Execute Powershell Command-0002Powershell is present.provaltech.com/dan.hicks
11:55:22 am 13-Jul-22Execute Powershell CommandSuccess THENprovaltech.com/dan.hicks
11:55:22 am 13-Jul-22Execute Powershell Command-0011Powershell command completed!provaltech.com/dan.hicks
11:55:21 am 13-Jul-22Execute Powershell Command-0011Executing powershell "" -Command "Remove-Item %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs/* -Recurse -Force" ""provaltech.com/dan.hicks
11:55:21 am 13-Jul-22Execute Powershell Command-0010Not sending output to variable.provaltech.com/dan.hicks
11:55:21 am 13-Jul-22Execute Powershell Command-0008New command variable is: -Command "Remove-Item %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs/* -Recurse -Force"provaltech.com/dan.hicks
11:55:21 am 13-Jul-22Execute Powershell Command-0008Custom commands detected as Remove-Item %ProgramData%/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs/* -Recurse -Forceprovaltech.com/dan.hicks
11:55:20 am 13-Jul-22Execute Powershell Command-0002Powershell is present.provaltech.com/dan.hicks
11:55:12 am 13-Jul-22Run Now - Soji - Disk CleanerAdmin provaltech.com/dan.hicks scheduled procedure Run Now - Soji - Disk Cleaner to run at Jul 13 2022 11:55AMprovaltech.com/dan.hicks

Process

Describe the steps the script performs to accomplish the desired task. Note that if this script is just a front-end for a piece of agnostic content, then you can insert a link to the documentation for that content here instead.

Output

  • Agent Procedure Log
  • $env:ProgramData/_automation/AgentProcedure/SojiDiskCleaner/SojiLogs
  • View / Custom Fields
  • etc.