guide · static export
PC

Verify and Enable TRIM on an SSD in Windows 11

TRIM tells the SSD which blocks are free. Two commands show whether it runs, and one command retrims a drive that fell out of the schedule.

by@guidox updated:10/30/26 time:10 min level:Intermediate tested on:Windows 11 24H2 works on:Windows 10, Windows 11
TL;DR

**fsutil behavior query DisableDeleteNotify** returning **0** means TRIM is on. Run **Optimize-Volume -ReTrim** per SSD and let the weekly schedule do the rest - never defrag an SSD.

Before you start

Requirements

  • Windows 10 or Windows 11
  • At least one SSD, SATA or NVMe
  • An admin PowerShell
Step by step

Instructions

01

Check the TRIM flag

Run the query in an admin PowerShell. A value of 0 means TRIM is enabled, 1 means Windows is still telling the drive that deleted blocks are in use.

fsutil behavior query DisableDeleteNotify
02

Enable it if the value is 1

Set the flag back to 0. No reboot is required for it to take effect.

fsutil behavior set DisableDeleteNotify 0
03

Confirm Windows recognises the drive as an SSD

Optimize Drives must list the media type as Solid state drive. If it says Hard disk drive, the SATA controller is in IDE or RAID mode and never sends TRIM.

Get-PhysicalDisk | Select-Object FriendlyName, MediaType, HealthStatus
⚠ warningSwitching a SATA controller to AHCI without the registry preparation can stop Windows from booting.
04

Retrim the drives that need it

The C: drive is in the weekly schedule already. Secondary SSDs that are not in the schedule get one manual retrim, which takes a few seconds.

Optimize-Volume -DriveLetter D -ReTrim -Verbose
tipRun it after deleting a large game library - the drive then knows those blocks are free.
05

Check the schedule

Confirm the scheduled maintenance task is ready and set to weekly. Windows runs it when the machine is idle, so it usually goes unnoticed.

Get-ScheduledTask -TaskName ScheduledDefrag | Select-Object State
06

Never defrag an SSD

Windows treats SSDs as 'optimize', which sends TRIM. A manual defrag adds writes without speed and shortens the drive's life.

Troubleshooting

Common issues

DisableDeleteNotify reports 1

TRIM is disabled - set it to 0 and retest. Some 'optimizer' tools switch it off, so check after running one.

Retrim fails with access denied

The shell is not elevated, or BitLocker is locked. Unlock the volume, then retry.

The drive is listed as HDD

The controller runs in RAID/IDE mode or an old driver hides the media type. Fix the controller mode first - TRIM cannot arrive otherwise.

FAQ

Frequently asked

Does TRIM delete my files?

No. It only tells the drive which blocks are no longer in use.

How often does Windows run it?

Weekly through the Optimize Drives schedule. A manual retrim after big deletions is a harmless extra.

How to undo this

Nothing to revert for a working TRIM. If you disabled it on purpose, set the flag back with the same command and reboot.

Changelog · 1 entry
  1. 2026-10-30
    First version
Interactive version: checklist, feedback, related guides →

Free · no account needed · tracks your progress