Windows defrags disk C, unless defragmentation is disabled

SM 40 Reputation points
2023-10-30T14:01:34.1566667+00:00

Hello,

I have a computer that has to be used for industrial applications.

It must stay on for long time periods to acquire data, therefore its resources cannot be saturated.

For this reason, I have disabled the automatic disk defragmentation.

Anyway I noticed that, every three days, the system defragment disk C.

I would like to know if there is a way to permanently disable the automatic defragmentation.

I have disabled it from "Defragment and Optimize Drives" (see the picture below).

Optimize drives

I noticed that the tool declare that the last defragmentation was run on 18/10/2023, while, looking at Windows event log, it is possible to see that the disk has been defragmented four times since that timestamp (see the picture below).

event log

Using "Performance monitor" I was able to determine that the defragmentation was active between 22:06:30 and 22:11:20 (below the disk usage in this time period).

Performance monitor

I also run the powershell command Get-ScheduledTask | Get-ScheduledTaskInfo | where-object -property LastRunTime -gt ((get-date).AddDays(-3)) | Sort-Object -Property LastRunTime | Format-Table -Property TaskName, LastRunTime to retrieve the last tasks executed by the system but there is nothing that appear to me related to the defragmentation, as can be noted in the following picture.

powershell

Operating system version is Windows 10 Enterprise LTSC 2019.

Thank you in advance for the help

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Darrell Gorter 2,731 Reputation points
    2023-10-30T18:48:40.0933333+00:00

    Hello,

    You could disable the start value of the defrag service in the registry. Disable would be a value of 4

    User's image

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Darrell Gorter 2,731 Reputation points
    2023-10-30T15:07:41.9766667+00:00

    Hello,

    Check scheduled tasks and see if you can disable the defrag task.

    Start - Run - taskschd.msc

    User's image

    0 comments No comments

  2. SM 40 Reputation points
    2023-10-30T15:28:20.86+00:00

    Hello, Darrell Gorter,

    Thank you for your answer.

    Unfortunately it is already disabled...

    User's image

    Is there something else that I can try?

    0 comments No comments

  3. SM 40 Reputation points
    2023-10-31T07:42:32.7+00:00

    Hello,

    Thank you, I have modified the key in the register from 3 to 4, as you suggested.

    Now I monitor the situation in the next days.

    0 comments No comments

  4. SM 40 Reputation points
    2023-11-03T08:06:34.1833333+00:00

    Hello,

    Unfortunately even the change of the register key did not solve the problem...

    This night (3 days after the last one) the defrag service started: any other ideas?

    I have to correct: after having restarted the PC two other times, it takes the register change and now it do not perform defragmentation.

    Thank you for the help

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.