This worklet will allow you to run the Windows Cleanup Tool on any of your Windows endpoints, based on the amount of free space remaining on the C: drive.
Before you run this Worklet
If you use the /SageSet and /SageRun commands, you’ll need to create presets on the endpoints first. This /SageSet process can be automated, as some folks have demonstrated here.
If you don’t want to bother with the /SageSet presets, you can use the /VeryLowDisk flag instead, with the caveat that this will pop up the scan completion windows on the endpoint, which might be confusing to users. More documentation on the cleanmgr.exe flag here.
Automox Worklet: Run Windows Cleanup Tool
To deploy this endpoint hardening Worklet, do the following:
- Log in to your Automox Console.
- Navigate to the System Management page and click Create Policy in the upper right-hand section of the screen.
- Choose Windows under Worklet.
- Copy and paste the Evaluation and Remediation code scripts from below. Choose the remediation code that matches your OS version.
5. Select Create Worklet.
6. Assign the Worklet to a group or multiple groups and select Save Changes.
7. Execute the Worklet by selecting the Execute Policy Now button.
If you need technical assistance, contact our support team at firstname.lastname@example.org.
Facing growing threats and a rapidly expanding attack surface, understaffed and alert-fatigued organizations need more efficient ways to eliminate their exposure to vulnerabilities. Automox is a modern cyber hygiene platform that closes the aperture of attack by more than 80% with just half the effort of traditional solutions.
Cloud-native and globally available, Automox enforces OS & third-party patch management, security configurations, and custom scripting across Windows, Mac, and Linux from a single intuitive console. IT and SecOps can quickly gain control and share visibility of on-prem, remote and virtual endpoints without the need to deploy costly infrastructure.
Experience modern, cloud-native patch management today with a 15-day free trial of Automox and start recapturing more than half the time you're currently spending on managing your attack surface. Automox dramatically reduces corporate risk while raising operational efficiency to deliver best-in-class security outcomes, faster and with fewer resources.