Monday, September 21, 2020
  • Home
  •             

Schedule a defrag on Windows quickly

May 12th, 2006 by Patrick S

If you want your system to automatically defrag your computer on a scheduled basis i have a quick little tip to achieve this.

  1. Click start
  2. Run
  3. Enter the following code and hit enter.

schtasks /create /TN defrag /RU "NT AUTHORITY\SYSTEM" /SC monthly /TR "defrag %systemdrive%"

  • weekly is when you want the script to run e.g monthly/weekly etc
  • NT Authority\system is the “system user” 
  • and systemdrive% is the local drive Windows is running on.

You can then config the scheduled task that has been created through the scheduled task manager.

Posted in Uncategorized, Windows Server System, Windows Vista, Windows XP | Comments Off on Schedule a defrag on Windows quickly


This entry was posted on Friday, May 12th, 2006 at 9:13 pm and is filed under Uncategorized, Windows Server System, Windows Vista, Windows XP. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.


Comments are closed.