+
  
SERVICES
  
PRODUCTS
  
CONTACT US

Automatic or Silent running of the Windows Disk Cleanup tool

by Chris Hall/December 1, 2016



Note: Before following the below procedure, if you are running Windows Server 2008/2012 please be sure to install the ‘Desktop Experience’ feature from Server Manager.

1. Run the below from a command prompt or run dialog window. The /sageset command allows you to record required settings for the Disk Cleanup tool to run silently.

%windir%\system32\cleanmgr.exe /sageset:1

Note: The /sageset:1 can actually be any number up to 65535. This is done so you can have multiple saved settings.

2. Once run, the Disk Cleanup tool will show. Tick your required files to be cleaned (or all) and click OK to save.

3. Create a scheduled task in Windows running the below command. This will repeat as scheduled cleaning the same selected files each time it is run. You can create multiple schedules for each setting you have saved by typing the required saved numbers in the /sagerun option (those you have set in step 1).

%windir%\system32\cleanmgr.exe /sagerun:1

← Back to News



Leave a comment

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


Want to say hey or find out more?


If you're part of a small/medium or enterprise level we
can help address your IT Management needs.

Get in touch
    
View our Services
                
Make your data
work for you.
Contact Us

+61 438 661 875
inquiries@datacommand.com.au

     

Copyright © DataCommand Pty Ltd / Privacy Policy
ABN 98 205 256 068 / ACN 131 977 323