Schedule Optimize Drives to TRIM SSDs and Defrag HDDs in Windows 10/11
Difficulty: Beginner | Time Required: 10 minutesWindows 10 and Windows 11 include a built-in maintenance tool called Optimize Drives. It helps keep storage running efficiently by using the right optimization method for each drive type. On a traditional hard disk drive, Windows can defragment files so they are arranged more efficiently. On a solid-state drive, Windows normally performs TRIM, which tells the SSD which blocks of data are no longer in use so the drive can manage cleanup more efficiently.
The good news is that Windows usually handles this automatically. However, it is still worth checking the schedule, especially if you have multiple drives, recently added a new SSD or HDD, or changed power settings that might prevent maintenance from running.
This tutorial will show you how to schedule Optimize Drives in Windows 10 and Windows 11 so SSDs are trimmed and HDDs are defragmented automatically.
Prerequisites
Before you begin:- You should be using Windows 10 or Windows 11.
- Your drives should be connected and visible in File Explorer.
- For laptops, plug into AC power if possible. Scheduled maintenance may not run while on battery.
- You do not need third-party defrag software. Windows already includes the correct tool.
Note: Do not manually run old-style defragmentation tools on SSDs. Windows Optimize Drives understands modern drive types and uses the appropriate operation.
Step 1: Open Optimize Drives
- Click Start or select the Search box on the taskbar.
- Type:
defrag - Select Defragment and Optimize Drives from the search results.
In Windows 11, the window may appear with a modern style, but the tool works similarly to Windows 10. - Review the list of drives shown under Status.
- Drive
- Media type
- Last run
- Current status
Step 2: Check Each Drive’s Status
- In the Optimize Drives window, click a drive in the list.
- Look at the Media type column.
- Check the Last run date.
- Check the Current status message.
- SSDs should show as Solid state drive.
- HDDs should show as Hard disk drive.
- A healthy drive will usually show a status such as OK.
Step 3: Turn On Scheduled Optimization
- In the Optimize Drives window, look near the bottom for Scheduled optimization.
- If it says Off, click Change settings.
- Check the box for:
Run on a schedule - Choose a frequency from the drop-down menu:
- Daily
- Weekly
- Monthly
- For most home and office PCs, choose Weekly.
Step 4: Choose Which Drives Are Included
- In the same schedule settings window, click Choose.
- Review the list of drives.
- Check the drives you want Windows to optimize automatically.
- Leave your main Windows drive selected unless you have a specific reason not to.
- If you regularly connect secondary internal drives, include them too.
- Click OK.
Automatically optimize new drivesIf available, leave this enabled. This helps Windows include new drives in the schedule when you add or replace storage later.
Step 5: Save the Schedule
- After selecting your drives, click OK.
- Back in the schedule settings window, click OK again.
- Confirm that Scheduled optimization now shows as On.
Step 6: Run a Manual Optimization Optional
If you want to run optimization right away:- Select the drive you want to optimize.
- Click Optimize.
If you are using an HDD, you can also click Analyze first to let Windows check whether the drive needs optimization. SSDs generally do not need the same kind of fragmentation analysis that traditional hard drives do.
Tip: Manual optimization is useful after installing a large application, moving a lot of files, restoring from backup, or adding a new drive.
Tips and Troubleshooting
If Optimization Does Not Seem to Run
Scheduled optimization may be skipped if:- The PC is turned off during the scheduled maintenance window.
- The PC is asleep or hibernating.
- A laptop is running on battery power.
- The computer is not idle long enough.
- The drive has errors that need to be repaired first.
If a Drive Shows the Wrong Media Type
Sometimes Windows may identify a drive incorrectly, especially after cloning a system, changing storage controllers, using older drivers, or working with virtual disks.If an SSD appears as an HDD:
- Make sure Windows is fully updated.
- Install the latest chipset and storage controller drivers from your PC or motherboard manufacturer.
- Restart the computer.
- Reopen Defragment and Optimize Drives and check again.
If Optimization Fails
If Optimize Drives reports an error:- Open Command Prompt as administrator.
- Run the following command, replacing
C:if needed:
chkdsk C: /scan - Restart the PC if Windows recommends repairs.
- Try Optimize Drives again.
Warning: Always back up important files before running disk repairs or making storage changes.
Should You Disable Scheduled Optimization?
In most cases, no. Scheduled optimization is safe and recommended for typical Windows 10 and Windows 11 systems. Windows is designed to treat SSDs and HDDs differently, so you do not need to disable the feature just because you have an SSD.You may only consider changing the schedule if:
- You are troubleshooting storage issues.
- You manage a specialized workstation or server.
- You use third-party enterprise storage tools.
- Your PC is rarely idle and you prefer to run maintenance manually.
Conclusion
Optimize Drives is a simple but important Windows maintenance feature. It helps HDDs stay efficient through defragmentation and helps SSDs maintain performance through TRIM. Once scheduled optimization is enabled, Windows handles the routine work automatically in the background.Taking a few minutes to check the schedule can help keep your drives healthy, reduce slowdowns on HDDs, and ensure SSDs receive the maintenance they need without relying on unnecessary third-party utilities.
Key Takeaways:
- Windows 10 and Windows 11 include built-in drive optimization.
- HDDs are defragmented; SSDs are typically trimmed.
- Weekly scheduled optimization is recommended for most users.
- Keep new drives included in the schedule when possible.
- Avoid old third-party defrag tools, especially for SSDs.
- If optimization fails, check the drive for errors and make sure your PC is plugged in and idle.
This tutorial was generated to help WindowsForum.com users get the most out of their Windows experience.
Structured References
- Microsoft Support documents that Windows 10 and Windows 11 include the Defragment and Optimize Drives tool, that Windows automatically optimizes drives, and that the default schedule is weekly. (support.microsoft.com)
- Microsoft Learn documents the
defragcommand behavior, scheduled task behavior, and SSD optimization policy details in Windows 10 and Windows 11. (learn.microsoft.com) - Microsoft Support notes that Windows storage settings can display disk type and that drive optimization helps maintain storage performance and health. (support.microsoft.com)
References
- Official source: support.microsoft.com
Defragment / optimize your data drives in Windows - Microsoft Support
Learn how to use Manage and Optimize Drives to keep your disk and data drives defragmented and at top performance in Windows.
support.microsoft.com
- Official source: learn.microsoft.com
defrag
Reference article for the defrag command, which locates and consolidates fragmented files on local volumes to improve system performance.learn.microsoft.com