AvoidErrors
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM
No Result
View All Result
AvoidErrors
No Result
View All Result

How to Setup Auto Disk Cleanup in Windows Server 2012

Muhammad Imran Habib by Muhammad Imran Habib
July 11, 2017 - Updated on September 8, 2021
in Windows
1
Share on FacebookShare on Reddit
Transfer Windows and Installed Data to Another Hard Drive

Since we have added the disk cleanup utility in our previous article now we will learn that how we can schedule a disk cleanup task in windows server so that we can keep our windows server performance optimized without our manual interruption and assistance.

We will use Windows Server 2012 R2 as an example, Log into your Windows server and open “Run” by right-clicking on the Windows icon.

Once Run bar is opened write the mentioned command and hit enter “cleanmgr.exe /sageset:1”. You can choose any number between 1 and 65535 but I have chosen 1.

It will open up “Disk Cleanup Settings”.

From here we can select the different files which we want to delete through disk cleanup utility. Once files are selected press “Ok”. Disk cleanup setting wizard will be closed so now we will open “Task Scheduler”.

Task Scheduler can be opened by clicking on the start button and select the control panel. In control panel click on administrative tools and scroll down to select Task Scheduler.

Double click on it and it will open Task Scheduler wizard. On the right side under “Actions” tab there is an option of “Create Task”.

Click on create task and name the task accordingly. I have names it “disk cleanup” and you can select different other options as well.

Click on “Triggers” tab and click on “New” as it will open “New Trigger” wizard

Here you can choose the settings accordingly and once you are done with the settings of new trigger click on “Actions” tab.

Click on “New” as it will open up the “New Action” wizard and click on browse tab under “Program/Script”. Scroll down to select the “Disk Cleanup”.

Now we will add arguments value as “/sagerun:1” so that it can run with our previously allocated settings for the condition 1.

Press “Ok” and it will bring you back to the create task wizard click “Ok”.

It will ask for the administrative password and you can check that newly created task is present in “Active tasks” portion of task scheduler.

Previous Post

How to Boot Directly to the Windows 8.1 Desktop

Next Post

Enable Shadow Copy on a Shared Folder in Windows Server 2012

Muhammad Imran Habib

Muhammad Imran Habib

Imran is a technology evangelist with 8 years of experience working with some of the Industry leading companies. Imran's expertise includes On-Prem/Virtual Infrastructure deployments, IT Solutions for SMEs, End User Computing Support.

Related Posts

Disable Windows Defender SmartScreen – Windows 11
Windows

Fix Windows 11 Defender Not Working

by Rhousse
January 24, 2023
How to Fix 503 Service Unavailable Error in Windows 10 
Windows

Fix HTTP Error 503: The Service is Unavailable in Windows 11

by Rhousse
January 24, 2023

Comments 1

  1. Donovan says:
    6 years ago

    Cool trick thank you!

Subscribe to get weekly tutorials direct to your inbox!

Disable Windows Defender SmartScreen – Windows 11
Windows

Fix Windows 11 Defender Not Working

by Rhousse
January 24, 2023
How to Fix 503 Service Unavailable Error in Windows 10 
Windows

Fix HTTP Error 503: The Service is Unavailable in Windows 11

by Rhousse
January 24, 2023
How to Modify Mouse Pointer in Windows 10
Windows

How to Fix Black Screen With Cursor in Windows 11

by Rhousse
January 24, 2023
Restore the Old Windows Desktop Icons – Windows 11
Windows

Fix and Enable Drag and Drop on Windows 11

by Rhousse
January 24, 2023




  • Disclaimer & Privacy Policy
  • FAQ
© 2022 Powered by Cloudways
No Result
View All Result
  • HOME
  • WINDOWS
  • APPLE
  • MS OFFICE
  • RASPBERRY PI
  • WORDPRESS
  • TECH TIPS
  • LINUX
  • VIRTUALIZATION
  • FORUM

© 2022 AvoidErrors Powered by Cloudways | Privacy

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.