The Microsoft Drive Optimizer will defragment your drives to optimize them. The same utility used to be called the Disk Defragmenter. Microsoft changed its name but still uses the method of defragmenting the drives to optimize them.

The following tutorial demonstrates how to optimize and defragment drives when using a version of the Windows 11 operating system.

How to Optimize Drives Using Settings App

You can optimize and defragment drives from the Settings app in Windows 11. Here is how to do that:

1. Open the Settings app.

2. Click on the System in the left menu and then click on the Storage from the right side of the same window.

3. Under the Storage management heading, click on the  Advanced storage settings link to reveal some extra options, and then click on Drive optimization.

Windows 11: System > Store > Advanced storage settings > Drive optimization

How to Optimize Drives Using File Explorer

You can optimize and defragment drives using File Explorer instead of the Settings app if you prefer. Both ways will open the same Optimize Drives utility.

Note: You can also use the File Explorer command bar to optimize and defragment drives. To use the command bar, open File Explorer, click the drive > See more three-dotted menu > Optimize.

1. Open File Explorer and click This PC.

2. Right-click on the drive to optimize and click Properties.

3. From the top of the properties dialog, click Tools.

4. Under the Optimize and defragment drive sub-heading, click Optimize > OK.

Windows C: Properties > Tools > Optimize

How to Use Optimize Drives Utility

Once you have the Optimize Drives utility open, use the following steps to optimize and defragment your drives:

Note: If you use the command line (CMD or PowerShell) you do not get this option. Only if you use the Settings app or File Explorer will you see the Optimize Drives dialog.

1. From the Status field of the Optmize drives dialog box, select the drive to be optimized and then click on the Optimize button.

2. There are also some optional features. Click Advanced View to see all hidden volumes (if there are any). And click Analyze if you prefer to analyze a drive to see if it needs optimizing.

Optimize Drives utility > Advanced View > Optimize

How to Optimize Drives Using Command Line

You can use the command line (CMD, PowerShell, or the Windows Terminal app) to optimize and defragment drives. Here is how:

1. Open the elevated Windows Terminal app and select the Command Prompt.

2. Type the defrag <drive>: /O command to optimize and defrag one drive or defrag /C /O for all drives.

Note: If using Windows PowerShell instead, you use the Optimize-Volume -DriveLetter <drive> -Verbose command.

In conclusion, that is how to optimize and defragment drives in Windows 11.