Windows 10 Defragment and optimize

Sonny

Fantastic Member
Joined
Nov 17, 2009
Messages
1,387
Since upgrading to Windows 10 2004, I have encountered an issue with the tool Defragment & Optimize Drives. I am able to run the tool and it appears to run the optimization command properly but upon reboot it returns to the above "Never run" and "Needs optimization" Any suggestions on how to fix?
Capture1.webp
 


Last edited:
Solution
You probably don't need this if you have an SSD. However, if you have that and many regular drives and sometimes experience a slowdown which disappears when you do a manual defrag, then this might help.

Run Task Scheduler, then go to the Microsoft - Windows - Defrag folder. You'll see a ScheduledDefrag entry if you set a schedule in the Defrag program.

The problem is that defrag will usually run if there's nothing else running. If you have some software that does, then it will think that the system isn't busy and thus will not defrag.

To fix that, create a new task in the same folder and copy the settings of the one made by Windows, making sure that you have the ff. in each tab setting:

General - change the user to system, check...
I have Version 2004 (19041.329) for my OS.
 


Last edited:
If it's an SSD then that is normal. SSD won't and should not be defragged. They are cleaned up with trim. Defrag will severely diminish the life span of a SSD
 


If it's an SSD then that is normal. SSD won't and should not be defragged. They are cleaned up with trim. Defrag will severely diminish the life span of a SSD
It is an HDD 2 terabyte hard drive.
 


When I went to defrag it showed 7%. When done it showed zero% and date of it being defraged. Today I went in to check it and it said never run. In the past it always gave the date of the last time it was checked. Not so now with Version 2004.
 


Last edited:
Couldn't say way. I never ran the defrag even when I did have a spinning disk since Windows does it automatically in Windows 10.
 


You probably don't need this if you have an SSD. However, if you have that and many regular drives and sometimes experience a slowdown which disappears when you do a manual defrag, then this might help.

Run Task Scheduler, then go to the Microsoft - Windows - Defrag folder. You'll see a ScheduledDefrag entry if you set a schedule in the Defrag program.

The problem is that defrag will usually run if there's nothing else running. If you have some software that does, then it will think that the system isn't busy and thus will not defrag.

To fix that, create a new task in the same folder and copy the settings of the one made by Windows, making sure that you have the ff. in each tab setting:

General - change the user to system, check "run with the highest privileges", and configure for Windows 10

Triggers - set the schedule that you want

Actions - run the program

%windir%\system32\defrag.exe

with the ff. arguments:

-c -h -o -$

Conditions - uncheck everything except for power if you're using a laptop

The system will defrag one disk at a time during the schedule given. Any SSDs will only be trimmed.

You can right-click and run the task to see if it works. Run the defrag program and you'll see that it is defragmenting one drive at a time.

You can also right-click and disable the task if you wish.
 


Solution
Back
Top