Windows 10 disable automatic defragmentation
How to disable automatic defragmentation in Windows 10? It is scanning my 2 TB HDD for 2 hours already and lags too much.
In addition to the method geotavros described, another method for turning off automatic defrag/optimization can be accomplished by doing the following....
- Click on the
Start Menu
- Start typing
Defrag
and you'll see an option come up calledDefragment and Optimize Drives
. Select that. - Make sure the drive you want to turn off defrag/optimize is highlighted and then click on
Change Settings
. - Uncheck the box that says
Run on a schedule
- Click on OK and you're done.
Alternative process with Command Prompt::
- Run Command Prompt as administrator and run the command
schtasks /Delete /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /F
/TN option specifies the path\name of the task to delete.
/F option forcefully deletes the task and suppresses warnings if the specified task is currently running.
Open an administrative cmd prompt (or Powershell, up to you) and execute:
schtasks /Change /DISABLE /TN "\Microsoft\Windows\Defrag\ScheduledDefrag"
This command disables the task, just as the original question asks and is a faster, cmd line-based solution that functions identically to the top GUI answer from n8te.
This doesn't delete the task, which means that if you decide you need it enabled again at a later date, simply change DISABLE
to ENABLE
and run again in an elevated admin prompt:
schtasks /Change /ENABLE /TN "\Microsoft\Windows\Defrag\ScheduledDefrag"
You can disable it via the Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag > then disable the "ScheduledDefrag".