Disk Defragmenter no longer appears in Windows 10 or 11. Microsoft renamed it to Defragment and Optimize Drives (also called Optimize Drives) starting with Windows 8. The tool works the same way for HDDs, and Windows now also handles SSD optimization automatically. You can find more information on shouldn’t defragment a SSD.
Method 1: Open from Start Menu Search
This is the fastest route, and searching the old name still works. Windows redirects you to the right tool.
- Click Start or press
Windows + Sto open the search bar.
- Type defrag or optimize.
- Click Defragment and Optimize Drives in the results.

The Optimize Drives window opens with a list of all your drives, their media type (HDD or SSD), the last optimization date, and current status. For more information on optimizing your Windows 11 PC, you can check out how to optimize your Windows 11 PC for gaming.
Method 2: Open from File Explorer
- Press
Windows + Eto open File Explorer.
- Under This PC, right-click the drive you want to optimize and select Properties.
- Click the Tools tab.
- Click Optimize under “Optimize and defragment drive.”

On Windows 11, there’s a shortcut: select a drive in This PC, click the three-dot (…) menu in the command bar, and choose Optimize. You can also learn more about tips to improve your Windows 11 PC battery life.
Method 3: Open from Windows Settings
- Press
Windows + Ito open Settings.
- Go to System > Storage.
- Scroll down and expand Advanced storage settings.
- Click Drive optimization.

Method 4: Use the Command Line (Advanced)
If you prefer the command line or want to automate optimization, both Command Prompt and PowerShell work. For more information, you can visit Microsoft’s support page on defragmenting and optimizing drives.
Command Prompt (run as Administrator):
- Press
Windows + S, type cmd, right-click Command Prompt, and select Run as administrator.
- To optimize a specific drive:
defrag C: /O
- To optimize all drives at once:
defrag /C /O
The /O flag applies the appropriate optimization for the drive type: defragmentation for HDDs, TRIM for SSDs. You can also check out PCMag’s guide on how to defrag your hard drive in Windows 10.
PowerShell (run as Administrator):
- Press
Windows + S, type PowerShell, right-click it, and select Run as administrator.
- Run:
Optimize-Volume -DriveLetter C -Verbose
How to Analyze and Optimize a Drive
Once Optimize Drives is open:
- Select the drive you want to work on from the list.
- Check the Media type column, which shows whether the drive is an HDD or SSD.
- For HDDs: Click Analyze to check the current fragmentation level. If it’s above 10%, click Optimize to defragment.
- For SSDs: Skip Analyze and click Optimize directly. Windows runs the appropriate SSD optimization (TRIM), not traditional defragmentation.

If you see a high pass count (such as “Pass 31”) while optimizing, that’s normal. It reflects how many passes the algorithm took, not a sign of a drive problem. You can learn more about how to defrag Windows 10 and if it’s worth it.
How to Change the Optimization Schedule
Windows automatically optimizes drives weekly by default. To adjust the frequency:
- In the Optimize Drives window, click Change settings.
- In the Optimization schedule dialog, set the Frequency to Daily, Weekly, or Monthly, or uncheck Run on a schedule to disable automatic optimization entirely.
- Click Choose to select which drives are included and whether newly connected drives are automatically added to the schedule.
- Click OK to save.

HDD vs. SSD: Does It Matter?
Optimize Drives detects your drive type and applies the correct operation automatically. You don’t need to configure anything:
| Drive Type | What “Optimize” Does | Manual Runs Needed? |
|---|---|---|
| HDD | Rearranges fragmented file data to improve read speed | Optional; Windows auto-schedules weekly |
| SSD | Runs TRIM to clear invalid data blocks (not traditional defrag) | No; Windows handles this automatically |
If your drive shows as Solid state drive in the Media type column, you don’t need to run Optimize manually. Excessive manual runs on SSDs add unnecessary write cycles without improving performance. You can learn more about what defragging does on HP’s website.
Conclusion
For most people, the default weekly schedule handles everything, so you’ll never need to open Optimize Drives manually unless you’re troubleshooting a sluggish HDD or setting up a secondhand PC. If the tool keeps showing “Needs optimization” even after you’ve run it, the scheduled task in Task Scheduler is likely disabled or corrupted; resetting it, or running sfc /scannow in an elevated Command Prompt, clears it up in most cases.
