Protect your SSD to run for a longer time

Reading Time: 2 minutes

Best Practices for SSD Protection

  • Reduce unnecessary writes: SSDs have limited write cycles, so avoid constant overwriting.
  • Keep firmware updated: Manufacturers release firmware updates to fix bugs and improve longevity.
  • Maintain free space: Always keep at least 20% of your SSD free for wear leveling and performance.
  • Enable TRIM: Ensures deleted data is properly cleared, preventing performance degradation.
  • Avoid defragmentation: SSDs don’t benefit from defragging; it only adds unnecessary writes.
  • Disable hibernation & paging file (optional): These features write large amounts of data to SSD, shortening lifespan.
  • Enable write caching: Improves performance and reduces direct writes to the SSD.

Step-by-Step Windows 11 Configuration

1. Check TRIM Status

  • Open Command Prompt (Admin).
  • Run: fsutil behavior query DisableDeleteNotify
  • If result = 0, TRIM is enabled. If 1, enable it with: fsutil behavior set DisableDeleteNotify 0

2. Disable Hibernation (Optional)

  • Open Command Prompt (Admin).
  • Run: powercfg -h off
  • This prevents large hibernation files from being written to SSD.

3. Adjust Virtual Memory (Paging File)

  • Go to Settings → System → About → Advanced system settings.
  • Under Performance → Settings → Advanced → Virtual memory, click Change.
  • Either move the paging file to another drive (if available) or set a fixed size to reduce constant resizing.

4. Enable Write Caching

  • Open Device Manager → expand Disk drives.
  • Right-click your SSD → Properties → Policies.
  • Check Enable write caching on the device.

5. Keep SSD Firmware Updated

  • Visit your SSD manufacturer’s website.
  • Download and install the latest firmware update tool.

6. Maintain Free Space

  • Regularly check SSD usage in Settings → System → Storage.
  • Keep at least 20% free for optimal performance.

7. Avoid Defragmentation

  • Windows automatically optimizes SSDs with TRIM, not defrag.
  • Verify in Defragment and Optimize Drives that your SSD is set to Optimize (not defrag).

Extra Tips

  • Store large, rarely accessed files (videos, archives) on an external HDD instead of SSD.
  • Use cloud storage for backups to reduce local SSD stress.
  • Monitor SSD health with tools like CrystalDiskInfo or manufacturer utilities.

POWERSHELL SCRIPT FOR SSD PROTECTION


# SSD Protection Script for Windows 11
# Run as Administrator

Write-Host "=== SSD Protection Script Started ==="

# 1. Enable TRIM
fsutil behavior set DisableDeleteNotify 0
Write-Host "TRIM enabled."

# 2. Disable Hibernation (optional)
powercfg -h off
Write-Host "Hibernation disabled."

# 3. Set Paging File to System Managed (reduces resizing writes)
$computerSystem = Get-WmiObject Win32_ComputerSystem
$computerSystem.AutomaticManagedPagefile = $true
$computerSystem.Put()
Write-Host "Paging file set to system managed."

# 4. Enable Write Caching
$disk = Get-WmiObject -Namespace root\wmi -Class MSFT_DiskCache
foreach ($d in $disk) {
    $d.EnableWriteCache($true)
}
Write-Host "Write caching enabled."

# 5. Prevent Defragmentation (SSD should only run TRIM)
schtasks /Change /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /Disable
Write-Host "Scheduled defragmentation disabled."

# 6. Display SSD Health Info (requires admin rights)
Get-PhysicalDisk | Select FriendlyName, MediaType, HealthStatus, OperationalStatus

Write-Host "=== SSD Protection Script Completed ==="

How to Use

  1. Open PowerShell as Administrator.
  2. Copy-paste the script above.
  3. Run it—your SSD will be configured with optimal protection settings.

Notes

  • The script disables hibernation and scheduled defrag automatically. If you rely on hibernation, skip that line.
  • Paging file is set to system managed (safe default). If you want to move it to another drive, that requires manual adjustment.
  • Firmware updates must still be done via your SSD manufacturer’s tool.