Automate Enhanced Disk Cleanup Tool operation in Windows 10


  1. Clever but also redundant. There are so many useful and free disk cleaning utilities around, so why go to all this trouble.

  2. People are missing the point that you can configure these sets to be scheduled and clean up exactly what you want. You can even clean Windows Update install files on client PC’s. On a domain with 20,000+ workstations I don’t think manually running CCleaner is viable nor would it be capable of cleaning all areas that build up ‘guff’ in a corporate environment.

  3. Great article! I came here after checking a Microsoft page about automating disk cleanup. Pathetic! This is a brilliant way to AUTOMATE the task of cleaning out all those niggly files, most of which should not have stayed behind anyway. I much prefer this over CC cleaner. Thanx for an excellent post!

  4. How do you automate the SageSet option on 20,000+ workstations? Everything I have read indicates you must run through the GUI first in order to enable the SageRun option.

  5. You can export the sageset registry key once you run /sageset:1 and then deploy it using group policy preferences.

  6. I want to thank Anand for this article. My disk C: was filling up and after much research I found this was due to the winsxs backup files and I needed to clear through the newly installed Windows Update clean via Disk cleanup. However, this checkbox never appeared. Logging on as administrator did not help nor did running cleanmgr as administator by direct command. I finally used the sageset switch above and cleaned up the Windows Update files as well as many other files shown as options in sageset. I gained a massive 7GB in space!

  7. Hi Guys, thanks for the great article, but unfortunatelly it won´t work at me automatically. When I say, that the cleaner should delete Previous Windows Versions, a Window pop up, and informs, that is dangerous blah blah blah. So it cannot run automatical. Have anybody a solution for this?

  8. You’ll have to delete it yourself, which itself is fairly easy. After permanently deleting it you won’t get that popup notification anymore. If you do by some chance, then simply disable the option by deselecting it in the process mentioned in above article.

  9. Thanks for the info. I followed your instructions and was successful in setting up a task to give this hard drive a shave and a haircut on a regular basis. Appreciate your helpful post.

  10. I just tried this but it doesn’t work. The utility starts and runs, but nothing gets cleaned up. When I open Disk Cleanup to make sure, the Temporary Internet Files (3.93 MB) and Thumbnails (10.0 MB) are still there. I copied the code from this page and put it into the Scheduled Task unaltered. What else might I be missing?

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 5 =