Schedule disk defragmentation
- Last UpdatedApr 10, 2025
- 1 minute read
You can use Windows Scheduled Tasks utility to run a batch file once a week to defrag your server hard disk.
To configure periodic disk defragmentation
-
Create a simple .bat file containing the Windows defrag command.

For a description of Windows defrag commands, type "defrag" in the Windows command window.

-
Copy the batch file into a location where it can reside on Server.
-
In Windows Control Panel, double-click Scheduled Tasks.
-
Schedule the batch file for execution at a low–usage time; for example, 1 AM every Sunday morning.