A desktop monitor displays multiple system maintenance and storage management panels beside a keyboard, mouse, and coffee mug.
Windows cleanup apps love a dramatic progress bar. The tools underneath them are already on your PC. MakeUseOf's Afam Onyimadu argues that a handful of PowerShell and DISM commands can replace a third-party cleaner. The article has a point, but it needs one correction. These commands are targeted housekeeping and repair tools. Nobody has benchmarked them as general speed boosters. Used on a healthy PC, they will mostly free some disk space and give you better visibility. If a machine is stuck in repeated failures, they may also make it feel smoother.

Below is the practical version, with Microsoft's documentation where it confirms or limits the claims. Run the system-level commands from an elevated session. In practice that means Terminal (Admin) or an elevated PowerShell window.

A desktop monitor displays multiple system maintenance and storage management panels beside a keyboard, mouse, and coffee mug. 1. Preview Temp cleanup before deleting anything​

The article's first trick is to preview a cleanup before you commit to it:

Get-ChildItem "$env:TEMP" -File -Force | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-7) } | Remove-Item -WhatIf

Here is what the command does:

  • It looks only at files directly inside your user Temp folder. There is no -Recurse, so subfolders are left alone.
  • -Force includes hidden files.
  • The Where-Object filter keeps only files last written more than seven days ago. Newer files, which open apps may still be using, are skipped.
  • -WhatIf turns the delete into a simulation. Microsoft's own documentation for Remove-Item describes -WhatIf as showing what would happen if the cmdlet runs, without running it. The packet's Remove-Item reference says exactly this.

Once the preview looks sane, you run the same command without -WhatIf. Files deleted this way skip the Recycle Bin, so the preview is your only safety net. The article also suggests swapping the final stage for Measure-Object -Property Length -Sum to see how much space is at stake. Verify that variant in your own session before relying on it.

The article claims Storage Sense is off by default and only acts when space runs low. That behavior varies by Windows version and configuration, so don't treat it as universal. The real selling point here is the visible, user-defined rule.

Never point this pattern at Documents or Downloads.

2. Analyze the component store first, then decide​

Windows keeps older versions of updated components so you can roll back. A scheduled task removes them eventually. Microsoft says these components are kept in the folder in case you need to roll back changes or repair corrupted files.

Start with the report:

DISM /Online /Cleanup-Image /AnalyzeComponentStore

The report matters because File Explorer overstates the size of the WinSxS folder. Microsoft's example output shows an "Explorer Reported Size" next to a smaller "Actual Size of Component Store," with a breakdown that includes backups and disabled features. Real-world reports on Windows 11 24H2 look similar. One user's output showed an Explorer-reported 62.09 GB against an actual 49.76 GB, along with "Component Store Cleanup Recommended : Yes".

Look at the last line of the report. If it says cleanup is recommended, run:

DISM /Online /Cleanup-Image /StartComponentCleanup

If it says no, close the window. Microsoft's documentation explains how this differs from the automatic route. The scheduled task waits at least 30 days after an updated component is installed before removing earlier versions, and has a one-hour timeout. That quote comes from the WinSxS guidance in the packet, not the search result above. Running DISM manually on Windows 10 or later removes superseded versions immediately and has no one-hour limit.

How much you gain depends on how long the PC has gone without cleanup. Third-party guides cite roughly 1–5 GB on a regularly patched machine. That is an estimate from community sources, not a guarantee.

Skip /ResetBase unless you mean it​

The article warns against /StartComponentCleanup /ResetBase, and Microsoft backs the warning. The switch removes all superseded versions of every component, and Microsoft's guidance warns that existing update packages can't be uninstalled after it completes. Future updates can still be uninstalled. Don't delete anything from WinSxS by hand either. Microsoft warns that doing so can leave a PC unable to boot or update.

3. Let Optimize-Volume pick the right job​

The old advice to "defrag everything" is outdated for SSDs. Identify your drive type first:

Get-PhysicalDisk | Select FriendlyName, MediaType

Then analyze before you optimize. This runs from an elevated session:

Code:
Optimize-Volume -DriveLetter C -Analyze -Verbose
Optimize-Volume -DriveLetter C -Verbose

Microsoft documents the default behavior of the cmdlet when you give it no operation switch:

Storage typeDefault operation
HDD, fixed VHD, Storage SpaceAnalyze, then defragment
SSD with TRIM supportRetrim
SSD without TRIM support, removable FAT, unknown mediaNo operation

So the cmdlet is not a blind "defrag". It adapts to the volume. Swap C for the volume you actually mean. The article says Windows already optimizes drives weekly, so a manual run is for odd cases. Examples are after moving a huge pile of files, or when you suspect the schedule was switched off. I couldn't confirm that weekly schedule in Microsoft's cmdlet documentation, so treat it as the author's description of typical behavior. Expect a noticeable gain only on a neglected hard drive. On an SSD the effect is modest housekeeping.

4. DISM and SFC for suspected corruption​

This is repair, not tuning. It's the right tool when Windows Update fails, Settings crashes, or apps die for no clear reason. A restart clears memory, not damaged files. Run these in order:

Code:
DISM /Online /Cleanup-Image /RestoreHealth
sfc /scannow

Microsoft's Windows Update troubleshooting guidance uses the same sequence. Notes from that guidance:

  • DISM repair works best when it can reach Microsoft's servers for replacement files, so stay online.
  • If the PC can't reach Windows Update, you can point DISM at a known-good source. The syntax is /Source:<path> /LimitAccess. Microsoft's example uses a matching Windows installation on another machine.
  • DISM writes a log to %windir%\Logs\CBS\CBS.log. Check it if the repair fails.
  • Microsoft says that if DISM doesn't report a successful restore, you should analyze CBS.log and fix the errors before continuing.

SFC checks protected system files and replaces incorrect versions. It needs administrator rights. The article says it ends with one of three outcomes: no problems found, problems found and repaired, or problems found that couldn't be fixed. For the last case it suggests rerunning DISM and then SFC. That's a reasonable first move, but it isn't guaranteed to work. Persistent failures usually mean reading the CBS log or supplying a repair source.

When to use which​

  • Disk space is tight: preview the Temp cleanup, then analyze the component store.
  • You just migrated a lot of data: analyze the volume, then optimize it if needed.
  • Updates or system apps keep failing: run DISM RestoreHealth, then SFC.
  • Everything works and you're just bored: do nothing. The component store analysis will often tell you so itself.

Verdict​

The article's case against cleanup apps is fair on transparency. These commands show you what they will do, and -WhatIf, -Analyze, and AnalyzeComponentStore are the safeguards that make that possible. The "faster than any app" headline is more marketing than measurement. No one tested these commands against cleaner apps. The commands recover space, avoid obsolete defrag habits, and fix real corruption.

Treat the two deletion commands as the sharp ones. A simulation first, plus a reason to run the second command, is the whole discipline.

 

References

  1. A few PowerShell commands can clean up and speed up Windows faster than any app MakeUseOf 2026-10-26T14:30:18+00:00
  2. (SOLVED) - Windows 11 Pro 24H2 DISM /Online /Cleanup-Image /StartComponentCleanup Error 1726 at 5% sysnative.com
  3. Remove-Item (Microsoft.PowerShell.Management) - PowerShell | Microsoft Learn learn.microsoft.com