HomeNewsletterCommunityMVP FeedToolsArchiveBlogToday's NewsAboutServicesQuick Links Subscribe free
← Back to Blog
Windows 11 Windows 11Storage SenseIntuneGroup PolicyOneDriveDisk CleanupRegistryPowerShell

Storage Sense deleted the file a user needed: what it removes, when, and how to pin it centrally

IA
Imran Awan
21 August 2026

A user calls the service desk. A file they deleted last month has gone from the Recycle Bin. A second user cannot open a OneDrive spreadsheet on a train, because the local copy turned into a placeholder overnight. A third user lost an installer from Downloads that they had saved two days earlier. Nobody ran a cleanup. Nobody emptied anything. The common thread is a Windows feature called Storage Sense, and on almost every fleet it is running with defaults that no administrator ever chose.

The short version

Storage Sense is four independent cleanup levers behind one toggle: temporary files, Recycle Bin, Downloads folder, and OneDrive cloud-content dehydration. Only two of them do anything out of the box, because Microsoft documents the Downloads and cloud-content thresholds as defaulting to 0, which means never, while the Recycle Bin threshold defaults to 30 days and temporary-file cleanup defaults to on. There is no fixed clock either: the default cadence value is 0, meaning during low free disk space, and Microsoft publishes no percentage for what low means. Pin all six values under the documented policy key from Group Policy or the Intune Settings Catalog and the guesswork stops.

The problem: three different files, one silent cleaner

Storage Sense is the Windows feature that frees disk space on its own. Microsoft describes it as a feature that helps automatically free up disk space by deleting unnecessary files, such as temporary files, items in the recycle bin, and offline content from OneDrive. That one sentence hides four separate behaviours. Each one has produced a real support ticket.

The first is the Recycle Bin. Deleting a file into the Recycle Bin feels reversible. Users treat it as a safety net without knowing how deep the net is. It is thirty days deep, because thirty days is the documented default threshold. After that, Storage Sense removes the item permanently. There is no second bin behind the first one.

The second is the Downloads folder, and this is the lever that surprises people most. The condition is not how long ago the file was downloaded. It is how long ago the file was opened. The Settings app wording is "Delete files in my Downloads folder if they haven't been opened for more than:". A driver package saved on Monday for next week's rebuild has never been opened. If somebody set that threshold to one day, the file becomes a candidate on Tuesday.

The third is OneDrive. Storage Sense can take a locally cached OneDrive file and turn it back into an online-only placeholder. Microsoft calls that dehydration. The cloud copy is untouched and the file still appears in File Explorer, but the bytes are no longer on the disk. To a user on a plane, that is indistinguishable from the file being gone.

The fourth is temporary files, which is the least controversial of the four and the only one that is on by default.

Here is what the per-user configuration actually looks like on a device where nobody has applied policy. The value names are numeric and Microsoft does not document them.

Registry Editor - per-user Storage Sense state
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy
-------------------------------------------------------------------------
01   REG_DWORD   0x00000001
04   REG_DWORD   0x00000001
2048   REG_DWORD   0x00000000
CloudfilePolicyConsent   REG_DWORD   0x00000001
subkey: OneDrive!S-1-5-21-REDACTED!Business1|REDACTED
    02   REG_DWORD   0x00000001

Read that as: something is switched on for this user, and a OneDrive sync root has registered its own entry. What you cannot read from it reliably is which lever is which. That is the first half of the problem.

Gotcha: those numeric value names under StoragePolicy are observed on a live device and are not documented by Microsoft. Community write-ups map them to individual toggles, and the mapping is probably right, but an undocumented value name can change in any monthly update. Never build Intune detection or remediation logic on them. Read the policy key instead, which is documented and stable.

The second half of the problem is that Storage Sense has no clock you can point at. Its default cadence value is 0, which Microsoft documents as "During low free disk space". So the answer to "when does this run" is "we do not publish that", and the answer to "what does it delete" depends on four thresholds that a user may have changed in Settings and that you probably have not pinned.

Why it happens: four levers, two scheduled tasks, defaults nobody picked

Start with what Storage Sense actually is, in plain English, before any configuration.

Windows ships a maintenance feature that watches free space on the system drive. When it decides to act, it walks a fixed list of cleanup categories. It removes anything matching the age rule for that category. It only touches the system drive. It runs under Automatic Maintenance rather than on a schedule you set. And it has a per-user side, because Downloads, the Recycle Bin and OneDrive caches all live inside user profiles.

The chain, from trigger to deleted file

Two scheduled tasks are involved. Confusing them is easy, because one of them is literally named StorageSense. On a Windows 11 24H2 device both exist, under different folders.

Automatic MaintenanceDiskCleanup\SilentCleanupcleanmgr.exe /autocleanstoragesensefiles removed

The task that does the deleting is \Microsoft\Windows\DiskCleanup\SilentCleanup. Its action, read straight off a live device, is %windir%\system32\cleanmgr.exe with the arguments /autocleanstoragesense /d %systemdrive%. It has no calendar trigger. It has a maintenance window instead, with a period of one day and a deadline of one month. It runs in the context of the Authenticated Users group at the highest available privilege. That is why the cleanup can reach into the signed-in user's profile.

The second task is \Microsoft\Windows\DiskFootprint\StorageSense. It is not an executable at all. Its action is a COM handler class identifier, which resolves in the registry to C:\Windows\System32\StorageUsage.dll under the friendly name "StorageUsage State Reporter Task Handler". It runs as SYSTEM, once a day inside the maintenance window. Its job is storage state reporting, not file deletion.

Context: the working brief for this article assumed the Storage Sense task lived under \Microsoft\Windows\DiskCleanup. It does not. Both folders are involved and they do different jobs. DiskFootprint\StorageSense is the state reporter. DiskCleanup\SilentCleanup is the one that invokes cleanmgr with the Storage Sense switch. If you are hunting for evidence of a deletion, look at SilentCleanup.

The switch /autocleanstoragesense deserves a warning. Microsoft's cleanmgr reference documents /d, /sageset:n, /sagerun:n, /tuneup:n, /lowdisk, /verylowdisk and /autoclean. It does not document /autocleanstoragesense. That switch is visible in the shipped task definition on the device, so it is observed and real, but it is undocumented. Treat it as an implementation detail rather than a supported interface, and do not script against it.

The levers and their documented defaults

Each lever has a separate policy value and a separate default. The numbers below come from the Storage Policy CSP reference, which is the authoritative source.

LeverDocumented defaultWhat it removes when active
Storage Sense itselfPolicy default 0, meaning not enabled by policyNothing on its own. It is the master switch for everything below
Temporary files cleanup1, meaning onThe user's temporary files that are not in use
Recycle Bin threshold30 daysItems in the Recycle Bin older than the threshold, permanently
Downloads folder threshold0, meaning neverFiles in Downloads not opened within the threshold
Cloud content dehydration threshold0, meaning neverLocally cached OneDrive files not opened within the threshold become online-only
Cadence0, meaning during low free disk spaceNot a deletion lever. It decides when the others evaluate

Read that table twice. Out of the box, two levers are live and two are dormant. Temporary-file cleanup is on. The Recycle Bin purges at thirty days. Downloads and OneDrive dehydration sit at 0, and Microsoft is explicit about what 0 means: "If you set this value to zero, Storage Sense won't delete files in the user's Downloads folder."

That is a genuinely useful triage fact. When a user reports a lost download or an unexpectedly dehydrated OneDrive file, the shipped default did not do it. Somebody changed a threshold. Either the user did it in the Settings app, or a policy in your own tenant did it. Find out which before you go looking for a Windows bug.

Gotcha - Microsoft's own two pages disagree. The configuration guide says "By default, Storage Sense is enabled and set to run automatically when disk space is running low." The Storage Policy CSP reference says "By default, Storage Sense is turned off until the user runs into low disk space or the user enables it manually." Those are not the same claim. The safe reading, and the one that matches observed behaviour, is that the feature is dormant until either the user turns it on or the disk gets tight, at which point Windows turns it on itself. Either way, do not rely on "it is off by default" as a control. Pin it.

The low-free-space trigger, and what Microsoft will not tell you

Cadence value 0 is the default, and it means the run is condition-driven rather than clock-driven. The CSP text is that Storage Sense "is automatically turned on when the machine runs into low disk space and is set to run whenever the machine runs into storage pressure."

Context: Microsoft does not publish the threshold for low disk space. No percentage, no byte count, no build-specific figure. If you see a specific number quoted online, it is somebody's observation rather than documentation. Build your own free-space monitoring on a figure you choose, and set the cadence explicitly to 1, 7 or 30 so the run becomes predictable instead of reactive.

There are exactly four documented cadence values: 0 during low free disk space, 1 daily, 7 weekly, 30 monthly. The policy's own allowed range is the full 32-bit unsigned range, so nothing physically stops you writing 14. Only those four are documented, and the Group Policy dropdown offers only those four. Write one of the four.

How this interacts with OneDrive Files On-Demand

Dehydration only makes sense if OneDrive Files On-Demand is in play. Files On-Demand is the OneDrive feature that shows every cloud file in File Explorer while only downloading the ones you use. A file can be online-only, locally available, or pinned as always available on the device.

Storage Sense converts locally available files back to online-only when they have not been opened within the dehydration threshold. Two facts matter operationally. First, the OneDrive copy is not deleted. Microsoft states that "Online-only files stay safe in OneDrive and are visible on your device." Second, pinned files are exempt: "Files that you have marked to be always available are not affected and will continue to be available offline."

Tip: the supported way to protect a specific offline working set is "Always keep on this device" on the folder, not a Storage Sense exception. There is no per-path exclusion list anywhere in this policy surface. If a role genuinely needs offline files, pin the folder and explain why. For a whole cohort, set the cloud dehydration threshold to 0 by policy so the lever never fires for them at all.

The relationship to cleanmgr and the StateFlags mechanism

Because SilentCleanup calls cleanmgr.exe, people reasonably assume Storage Sense thresholds and Disk Cleanup profiles are the same system. They are not. They share a binary and nothing else.

Disk Cleanup has its own, much older, saved-profile mechanism. You run cleanmgr /sageset:n, tick the handlers you want in the dialog, and Windows writes a REG_DWORD named StateFlagsNNNN into each cleanup handler's subkey. Microsoft documents the encoding precisely: "If the option box is not selected, the value is 00000000. If the option box is selected, the value is 00000002." You then run cleanmgr /sagerun:n to execute that saved profile. The handlers live under one parent key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches

Two of the subkeys there are named Recycle Bin and DownloadsFolder, which is precisely why the two mechanisms get conflated. Ticking those boxes in a sageset profile is a completely separate decision from the Storage Sense day thresholds, and the profile you save has no effect on what Storage Sense does.

Gotcha: Microsoft's two pages give different ranges for n. The Windows Server command reference says "any integer value from 0 to 9999". The Automating Disk Cleanup support article says "any integer value from 0 to 65535". Stay inside 0 to 9999 and both documents agree with you. Also note that /d is documented as not being used with /sagerun:n, and that /sagerun enumerates every drive on the machine rather than only the one you had in mind.

StateFlags values do not exist until you run /sageset. On a clean device the subkeys carry Autorun and Flags values but no StateFlags values at all. That is expected, not a fault, and it is a useful way to tell whether anyone has ever built a Disk Cleanup profile on a machine.

Binaries, services and the rest of the plumbing

Only files verified present on a Windows 11 24H2 device are listed. Descriptions are the file descriptions read from the binaries themselves.

FileDescription on diskRole in the flow
C:\Windows\System32\cleanmgr.exeDisk Space Cleanup Manager for WindowsDoes the actual deletion. Invoked by SilentCleanup, and by you interactively or with sageset and sagerun
C:\Windows\System32\StorageUsage.dllStorage UsageHosts the COM class the DiskFootprint StorageSense task calls. Storage state reporting
C:\Windows\System32\SettingsHandlers_StorageSense.dllSystem Settings Storage Handler ImplementationBacks the Settings app Storage Sense page. This is what writes the per-user StoragePolicy values
C:\Windows\System32\StorageContextHandler.dllDevice Center Storage Context Menu HandlerShell context-menu surface for storage actions
C:\Windows\System32\disksnapshot.exeDiskSnapshot.exeRun by the sibling DiskFootprint Diagnostics task with -z. Footprint measurement, not cleanup
C:\Windows\System32\storsvc.dllStorage ServicesImplements the StorSvc service, hosted in svchost under LocalSystemNetworkRestricted
C:\Windows\PolicyDefinitions\StorageSense.admxAdministrative TemplateDeclares the six policies, their key, and their value names. Copy to a central store for domain use

The service is StorSvc, display name Storage Service, start type Automatic, expected state Running. It is a shared svchost service and it does far more than Storage Sense, so do not disable it as a way of stopping cleanups. Use the policy.

How to verify: registry, tasks, events and the companion script

Verification has three parts. What policy says, what the user side says, and whether the tasks have actually run.

The documented policy key

Every centrally managed Storage Sense value lands in one key. This is the shared parent for the whole table below.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\StorageSense

All six value names below are confirmed twice. Once in the Storage Policy CSP reference, and once in StorageSense.admx on the device, which declares the same key and the same value name for each policy element.

Value name (REG_DWORD)Allowed valuesMeaning
AllowStorageSenseGlobal1 allow, 0 block. Default 0Master switch. Set 1 and users cannot turn Storage Sense off. Set 0 and users cannot turn it on, and every other value here becomes inert
ConfigStorageSenseGlobalCadence0, 1, 7 or 30. Default 00 during low free disk space, 1 daily, 7 weekly, 30 monthly
AllowStorageSenseTemporaryFilesCleanup1 allow, 0 block. Default 1Whether temporary files not in use are deleted. Users cannot change it once set
ConfigStorageSenseRecycleBinCleanupThreshold0 to 365. Default 30Age in days after which Recycle Bin items are permanently removed. 0 means never
ConfigStorageSenseDownloadsCleanupThreshold0 to 365. Default 0Days since a Downloads file was last opened before it is deleted. 0 means never
ConfigStorageSenseCloudContentDehydrationThreshold0 to 365. Default 0Days since a cloud-backed file was opened before it becomes online-only. 0 means never
Destructive risk: ConfigStorageSenseRecycleBinCleanupThreshold and ConfigStorageSenseDownloadsCleanupThreshold cause permanent deletion. There is no undo, no second Recycle Bin, and no per-path exclusion. Setting the Downloads threshold to a small number across a fleet will delete installers, exports and saved attachments that users kept deliberately but never re-opened. Pilot on a ring of volunteers before you touch anyone else. If you are unsure, write 0, which explicitly means never, rather than leaving the setting unconfigured and letting the user decide.

Reading the effective configuration by hand

This first console block reads the policy key and the per-user key in one pass. The policy key is authoritative. The per-user key tells you what the human chose.

PowerShell - run elevated
$policy = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense' Get-ItemProperty -LiteralPath $policy -ErrorAction SilentlyContinue # Healthy managed device: six REG_DWORD values come back, one per lever. # Nothing at all returned means the key does not exist, so no policy applies # and both the user setting and the OS default are in play. That is the # unmanaged answer, not an error. $user = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy' Get-ItemProperty -LiteralPath $user -ErrorAction SilentlyContinue # Numeric value names such as 01, 04 and 2048 are UNDOCUMENTED. Read them for # context only. A missing key here just means this profile never opened the # Storage Sense settings page.

Read the first result as the decision and the second as the preference. If a policy value is present, the matching control in the Settings app is greyed out and the user's stored preference stops mattering.

Checking the tasks that actually fire

Configuration without execution proves nothing. This block reads both tasks, their state, their last run time and their last result code.

PowerShell - run elevated
Get-ScheduledTask -TaskPath '\Microsoft\Windows\DiskCleanup\' -TaskName 'SilentCleanup' | Select-Object TaskName, State # Healthy: State is Ready. Its action is cleanmgr.exe /autocleanstoragesense /d %systemdrive% # Suppressed: State is Disabled, and automatic cleanups will not happen at all. Get-ScheduledTask -TaskPath '\Microsoft\Windows\DiskCleanup\' -TaskName 'SilentCleanup' | Get-ScheduledTaskInfo | Select-Object LastRunTime, LastTaskResult, NextRunTime # LastTaskResult 0 means the last run completed. NextRunTime is normally EMPTY: # this is an Automatic Maintenance task with no clock trigger, so a blank # NextRunTime is healthy and is NOT evidence that it will never run again. Get-ScheduledTask -TaskPath '\Microsoft\Windows\DiskFootprint\' -TaskName 'StorageSense' | Get-ScheduledTaskInfo | Select-Object LastRunTime, LastTaskResult # This is the StorageUsage state reporter, not the cleaner. Do not read a # failure here as proof that no files were deleted.

The blank NextRunTime catches people out constantly. Both tasks carry a maintenance window rather than a trigger, so Task Scheduler genuinely has no next time to report.

Event Viewer: what exists, and what honestly does not

Microsoft publishes no Event IDs for Storage Sense. There is a channel named Microsoft-Windows-StorageSettings/Diagnostic, and on a live 24H2 device it is enabled with a 64 MB cap and contains zero events. So the honest position is that there is no Storage Sense event log to query. Anyone offering you a "cleanup completed" event ID for this feature is mistaken.

What you do get is Task Scheduler evidence, and that is enough to prove a run happened. These are the standard Task Scheduler operational IDs, filtered to the cleanup task.

Applications and Services Logs\Microsoft\Windows\TaskScheduler\Operational
Event IDMeaningHow to read it here
100Task Scheduler started an instance of the taskA Storage Sense cleanup began. The user name on the event is the profile whose Downloads and Recycle Bin are in scope
129Task Scheduler launched the task processGives you the cleanmgr.exe process ID, useful for correlating with other telemetry
200Action startedConfirms the action was cleanmgr.exe and not something substituted for it
201Action completed, with return codeReturn code 0 is a clean completion. This is your evidence that the cleanup ran
102Task instance finished successfullyPair it with the matching 100 to get the run duration
103Task Scheduler failed to start an instanceCarries an Error Value. Observed on the DiskFootprint task on a lab device with 0x80040154, the COM class-not-registered code
Event Viewer - TaskScheduler/Operational, filtered to the cleanup task
Information   21:46:53   Event 100   Task Scheduler started an instance of
    the "\Microsoft\Windows\DiskCleanup\SilentCleanup" task for user "CONTOSO\jdoe".
Information   21:46:53   Event 200   Task Scheduler launched action
    "%windir%\system32\cleanmgr.exe" in instance of task
    "\Microsoft\Windows\DiskCleanup\SilentCleanup".
Information   21:49:07   Event 201   Task Scheduler successfully completed task
    "\Microsoft\Windows\DiskCleanup\SilentCleanup", action
    "%windir%\system32\cleanmgr.exe" with return code 0.
healthy: 100, then 200, then 201 with return code 0, a couple of minutes apart
broken: an Event 103 carrying an Error Value, with no matching 201 afterwards

Log files and PowerShell: two honest N/As

There is no Storage Sense log file. cleanmgr.exe writes no text log of what it removed, and there is no per-run manifest anywhere on disk. If you need a record of what was deleted, you have to capture the configuration before the fact, which is exactly what the companion script is for. Do not spend an afternoon hunting for a log that does not exist.

There is also no Storage Sense PowerShell module. That is worth proving rather than asserting.

PowerShell - proving the cmdlet does not exist
(Get-Command *StorageSense* -ErrorAction SilentlyContinue | Measure-Object).Count # Returns 0 on Windows 11 24H2. There is no Get-StorageSense and no Set-StorageSense. # Every PowerShell approach to this feature is registry plus scheduled tasks. Get-Service -Name StorSvc | Select-Object Name, DisplayName, Status, StartType # Healthy: Storage Service, Running, Automatic. Do not disable it to stop # cleanups - it is a shared svchost service with unrelated responsibilities.
Tip: the companion script for this post does all of the above in one read-only pass, then finishes with a plain-English statement of what the next run would delete. It is at github.com/Imran76Awan/Windows-11-Scripts under storage-sense-disk-cleanup-policy. It never triggers a cleanup, never writes a registry value, and exits 1 rather than printing a clean-looking report if any read fails.

The fix: pin every lever centrally, Intune and Group Policy

The fix is not "turn Storage Sense off". Low disk space blocks Windows updates and degrades performance, and Microsoft frames Storage Sense as a way to keep update installs unblocked on small-disk devices. The fix is to make the behaviour a decision you made, wrote down, and applied identically everywhere.

Decide these six values before you open a portal.

SettingA defensible starting pointWhy
Allow Storage Sense GlobalAllowMakes the feature deterministic instead of self-enabling when the disk gets tight
Config Storage Sense Global Cadence7, weeklyA known day beats "sometime during storage pressure". Daily is reasonable on 64 GB devices
Allow Storage Sense Temporary Files CleanupAllowLowest-risk lever. It only touches temporary files that are not in use
Config Storage Sense Recycle Bin Cleanup Threshold30, or 0 if your users treat the bin as a backup30 matches the documented default, so pinning it changes nothing while removing the drift
Config Storage Sense Downloads Cleanup Threshold0, neverThis is the lever that generates tickets. 0 disables it and stops a user enabling it
Config Storage Sense Cloud Content Dehydration Threshold0 for laptop and field users, 30 or 60 for small-disk desk devicesDehydration is harmless on a wired desk PC and painful for anyone who works offline
Gotcha: all six of these are device-scope only. The Policy CSP marks each of them Device, not User. You cannot give the finance team a different Downloads threshold from the sales team on the same shared device, and you cannot target them at a user group and expect per-user behaviour on a multi-user machine. Scope by device group, or accept that the strictest device policy applies to everyone who signs in there.

Microsoft Intune, step by step

These settings live in the Settings Catalog under the Storage category. They are not in a Templates profile, and they are not under an Administrative Templates node in Intune.

intune.microsoft.comDevicesConfigurationCreateNew policy
  1. Sign in to the Microsoft Intune admin center at intune.microsoft.com.
  2. Go to Devices, then Configuration, then select Create and New policy.
  3. Set Platform to Windows 10 and later.
  4. Set Profile type to Settings catalog, then select Create.
  5. Name the profile something a future colleague will understand, for example W11 - Storage Sense baseline. Put the thresholds and the reason in the description.
  6. On the Configuration settings tab, select Add settings.
  7. In the settings picker, browse to or search for the category Storage.
  8. Tick all six settings: Allow Storage Sense Global, Allow Storage Sense Temporary Files Cleanup, Config Storage Sense Global Cadence, Config Storage Sense Recycle Bin Cleanup Threshold, Config Storage Sense Downloads Cleanup Threshold and Config Storage Sense Cloud Content Dehydration Threshold.
  9. Close the picker. Set Allow Storage Sense Global to Allow.
  10. Set Allow Storage Sense Temporary Files Cleanup to Allow.
  11. Set Config Storage Sense Global Cadence from the dropdown. The four options are 0 - Only when disk space is low, 1 - Daily, 7 - Weekly and 30 - Monthly.
  12. Type the three threshold values. Each accepts a whole number in the range 0-365. Remember that 0 means never for all three.
  13. Select Next through Scope tags.
  14. On Assignments, add a device group. Start with a pilot ring, not All devices.
  15. Review the summary, then select Create.
  16. Confirm delivery under Devices, then Configuration, then your profile, then Device status. Then confirm on an actual device by reading the policy key with the console block above. A green portal is not the same thing as a written registry value.

If you would rather use a custom profile, the OMA-URIs are documented. Each one is ./Device/Vendor/MSFT/Policy/Config/Storage/ followed by the value name, with data type Integer. There is no reason to prefer that over the Settings Catalog now that the settings are present in the picker, but it is handy for narrow exception profiles.

Group Policy, step by step

The Administrative Template is StorageSense.admx, which ships in C:\Windows\PolicyDefinitions on Windows 11. If you use a central store, copy it and its language file there first.

Computer ConfigurationAdministrative TemplatesSystemStorage Sense
  1. Open the Group Policy Management Console, or gpedit.msc for a single machine.
  2. Create or edit a Group Policy Object linked to the organisational unit holding your Windows 11 devices.
  3. Navigate to Computer Configuration, then Policies, then Administrative Templates, then System, then Storage Sense.
  4. Open Allow Storage Sense, select Enabled, then OK. Enabled writes AllowStorageSenseGlobal = 1.
  5. Open Allow Storage Sense Temporary Files Cleanup, select Enabled, then OK.
  6. Open Config Storage Sense Global Cadence, select Enabled, then choose from the dropdown: Every day, Every week, Every month or During low free disk space.
  7. Open Config Storage Sense Recycle Bin Cleanup Threshold, select Enabled, and type a number from 0 to 365.
  8. Open Config Storage Sense Downloads Cleanup Threshold, select Enabled, and type a number from 0 to 365. Type 0 if you want this lever dead.
  9. Open Config Storage Sense Cloud Content Dehydration Threshold, select Enabled, and type a number from 0 to 365.
  10. Close the editor, then run gpupdate /target:computer /force on a test device.
  11. Verify by reading the policy key. Six values should be present, and the numbers should be the ones you typed.
  12. Open Settings, then System, then Storage, then Storage Sense and confirm the controls are greyed out. The shortcut ms-settings:storagepolicies opens that page directly, and ms-settings:storagesense opens the parent Storage page.
Context: the friendly name in the Storage Policy CSP reference for the Downloads policy reads "Configure Storage Storage Downloads cleanup threshold". That is a typo in Microsoft's own generated documentation. The ADMX on disk and the Intune Settings Catalog both use the sensible name. If searching for the exact documented string comes up empty, that is why.

Defender and security policy: not applicable, and here is why

Storage Sense has no relationship to Microsoft Defender, Attack Surface Reduction, exploit protection, Windows Defender Application Control or the firewall. There is no Endpoint Security profile that affects it, and no ASR rule that blocks it. The one adjacent point is that Disk Cleanup registers a Windows Defender handler under the VolumeCaches key, which lets a sageset profile remove old Defender scan artefacts. That is a Disk Cleanup handler, not a security control, and selecting it changes no Defender setting.

Proof it worked: a real read-only run

The output below is a genuine run of the companion script on a Windows 11 24H2 device under Windows PowerShell 5.1, with the computer name, user name and OneDrive identifiers replaced. Nothing else has been edited. This device has no Storage Sense policy applied, which is exactly the unmanaged baseline the article is about.

Get-StorageSensePolicy.ps1 - real run, identifiers replaced
Machine policy key (Group Policy / Intune / Policy CSP) HKLM:\SOFTWARE\Policies\Microsoft\Windows\StorageSense Key is ABSENT. No Storage Sense policy is applied to this machine. # That single line is the finding. Everything below it is a default or a user choice. AllowStorageSenseGlobal not configured ConfigStorageSenseGlobalCadence not configured AllowStorageSenseTemporaryFilesCleanup not configured ConfigStorageSenseRecycleBinCleanupThreshold not configured ConfigStorageSenseDownloadsCleanupThreshold not configured ConfigStorageSenseCloudContentDehydrationThreshold not configured Per-user key written by the Settings app (UNDOCUMENTED value names) 01 = 1 UNDOCUMENTED: Storage Sense master toggle for this user 04 = 1 UNDOCUMENTED: clean up temporary files 2048 = 0 UNDOCUMENTED: cadence hint CloudfilePolicyConsent = 1 sync root subkey : OneDrive!S-1-5-21-REDACTED!Business1|REDACTED 02 = 1 UNDOCUMENTED per-sync-root value Scheduled tasks that drive Storage Sense \Microsoft\Windows\DiskFootprint\StorageSense State Ready Action COM handler CLSID for StorageUsage.dll Last run 2026-08-21 21:46:23 Last result 0x80040154 # 0x80040154 is REGDB_E_CLASSNOTREG. Observed on this lab device. It is the state # reporter and not the cleaner, so this does not mean cleanups are failing. \Microsoft\Windows\DiskCleanup\SilentCleanup State Ready Action %windir%\system32\cleanmgr.exe /autocleanstoragesense /d %systemdrive% Last run 2026-08-21 21:46:53 Last result 0x00000000 # 0x00000000 is the healthy answer: the cleanup task ran and completed. Next run none scheduled - driven by Automatic Maintenance, not a clock trigger System drive free space Drive C: free 413.9 GB of 951.6 GB (43.5% free) What the next Storage Sense run would delete on this device Storage Sense is not pinned by policy. Windows may turn it on by itself when the system drive runs low, so treat the levers below as live. Temporary files: app and system temporary files that are not in use will be deleted. Recycle Bin: items deleted longer ago than the threshold (documented default: 30 day(s)) are permanently removed. They are not recoverable afterwards. Downloads folder: nothing. The threshold is 0, which means never. Cloud content: nothing. The dehydration threshold is 0, which means never. This script only read. It did not clean, dehydrate, or change anything.

That is the whole argument for this article on one screen. The device has no policy. The master switch is user-controlled. Temporary files and the Recycle Bin are live. Downloads and cloud dehydration are dormant at 0. So if a user on this device lost a download, Storage Sense did not do it, and the investigation should go elsewhere.

After applying the baseline profile, the same run should show six configured values, a source of POLICY named against every lever, and a closing verdict that matches what you wrote down beforehand. That is the acceptance test. Not "the portal says succeeded", but "the script on the device agrees with my decision".

The script was verified with zero parse errors on both Windows PowerShell 5.1 and PowerShell 7. It contains zero non-ASCII characters, uses no null-conditional operators, and calls no cmdlet whose verb writes. It exits 1 with an explicit abort message if any read fails, so a clean report is always a real one rather than a silent gap.

Community deep-dives verified for this post

AuthorLinkWhat it adds
Anoop C NairManaging the Storage Sense Policy in Windows using IntuneScreenshot-led walkthrough of the Settings Catalog policy, including creating, assigning and removing the assignment. Fetched and confirmed as loading and on-topic

References

PowerShell — companion script

Download it from Imran76Awan/Windows-11-Scripts — no sign-in required. It is read-only: it reports and never changes a device or anything in Intune. Validate it in your own environment before relying on the output.

Get-StorageSensePolicy.ps1 — Reports the effective Storage Sense configuration on a Windows 11 device, read-only.
View all scripts on GitHub
Was this post helpful?
React below — no account needed
Share this post
LinkedIn X / Twitter Reddit Bluesky

More from EndpointWeekly

Windows 11
SMB signing became mandatory and your NAS stopped working:…
Windows 11 24H2 and later require SMB signing, refuse insecure guest logons and ship…
Windows 11
Print Spooler Hardening After PrintNightmare: The Settings That…
Microsoft flipped the Point and Print driver installation default on 10 August 2021 and a…
Windows 11
Your firewall rule is deployed and the traffic is still blocked:…
Windows Defender Firewall has three profiles, several rule stores and a per-profile merge…