Skip to content

Commit efff15e

Browse files
authored
AB#6860: Create Troubleshooting Guide: Windows Server Storage Sense (#9982)
* Create troubleshoot-windows-server-storage-sense.md * Update troubleshoot-windows-server-storage-sense.md * Update troubleshoot-windows-server-storage-sense.md * Update troubleshoot-windows-server-storage-sense.md
1 parent 6bab5d9 commit efff15e

File tree

1 file changed

+262
-0
lines changed

1 file changed

+262
-0
lines changed
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
---
2+
title: Troubleshoot Windows Server Storage Sense
3+
description: Resolves issues in Storage Sense, a feature to automatically free up disk space by removing unnecessary files.
4+
ms.date: 10/08/2025
5+
manager: dcscontentpm
6+
audience: itpro
7+
ms.topic: troubleshooting
8+
ms.reviewer: kaushika
9+
ms.custom:
10+
- sap:Backup, Recovery, Disk, and Storage\Storage Sense
11+
- pcy:WinComm Storage High Avail
12+
appliesto:
13+
- <a href=https://learn.microsoft.com/windows/release-health/windows-server-release-info target=_blank>Supported versions of Windows Server</a>
14+
---
15+
16+
# Troubleshoot Windows Server Storage Sense
17+
18+
## Introduction
19+
20+
Storage Sense is a built-in feature in Windows 11, Windows 10, and Windows Server editions that help you automatically free up disk space by removing unnecessary files. The feature is commonly used to manage local files and stale cloud content, clean up download folders, and manage user profiles in both physical and virtual desktop infrastructure (VDI) environments. However, users might encounter scenarios in which Storage Sense doesn't function as intended because of configuration issues, product bugs, unsupported environments, or external software interference. This article consolidates real-world support experience to provide comprehensive, step-by-step solutions for administrators and support staff.
21+
22+
## Troubleshooting checklist
23+
24+
Use this checklist for systematic troubleshooting:
25+
26+
- Identify the Windows version or SKU (for example, Enterprise, Multi-Session, Server, IoT).
27+
- Determine whether Storage Sense is expected to be available for the OS and SKU.
28+
- Check whether the latest Windows updates (including known hotfixes, such as KB5050092) are installed.
29+
- Check **Group Policy** > **Registry** for the correct configuration (especially for folder cleanup thresholds).
30+
- Verify the Storage Sense settings in Windows **Settings** > **System** > **Storage**.
31+
- Verify that the Storage Sense "scheduled task" exists, and check its state in Task Scheduler.
32+
- Look for relevant error messages in Task Scheduler and Event Viewer.
33+
- Determine whether recent third-party software (antivirus, DLP, backup) exists, and check the updating file access times.
34+
- Check which folders and drives are targeted for cleanup. Also check for open handles.
35+
- Determine whether the issue is file-specific, folder-specific, or profile-specific.
36+
- Review recent system, network, and storage topology changes.
37+
- Determine whether the issue affects a single user, subset, or all users.
38+
- [Optional] Try to manually run Storage Sense, and review storage space changes.
39+
40+
## Common issues and solutions
41+
42+
The following sections detail the most common failure modes and provide step-by-step solutions.
43+
44+
### Storage Sense is missing, not running, or not available
45+
46+
#### Cause
47+
48+
- Feature absent by design (for example, Windows 11 Multi-Session, version 23H2 or 22H2).
49+
- Unsupported SKU or version.
50+
- Known bug (for example, KB5050092 pre-fix environments).
51+
- Scheduled task is removed or unregistered.
52+
53+
#### Resolution
54+
55+
1. Check OS and SKU support: Check whether Storage Sense should be present (consult Microsoft documentation).
56+
1. Apply OS updates:
57+
- For missing or inactive Storage Sense, install the latest Windows Cumulative Updates.
58+
- For Multi-Session, version 23H2 or 22H2, apply KB5050092 or later (KB5051989).
59+
1. Check Task Scheduler: If the Storage Sense task is unregistered or missing, this condition might be by design or caused by a bug (reference KB5050092).
60+
61+
#### Workaround
62+
63+
If a feature is missing, use PowerShell or third-party tools and scripts for cleanup.
64+
65+
### Storage Sense runs but doesn't delete files as expected
66+
67+
#### Cause
68+
69+
- Incorrect Group Policy Object or registry settings or targeting.
70+
- Files and folders not in scope for Storage Sense (for example, subfolders in Downloads, nonsystem drives).
71+
- Antivirus or security tools update the "LastAccessTime" file.
72+
- Files are protected: Files are open, in use, hidden, or system-marked.
73+
74+
#### Resolution
75+
76+
1. GPO and registry:
77+
1. Make sure that policies are applied and registry keys are correct:
78+
- HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\StorageSense
79+
- For example, ConfigStorageSenseDownloadsCleanupThreshold DWORD for the Downloads folder.
80+
1. To check the policy, use gpupdate /force and gpresult /h result.html.
81+
1. Policy Scope:
82+
Only files that are in the root folder of Downloads are cleaned. Subfolders and customs folders require scripts.
83+
1. Folder and attribute check:
84+
1. Use PowerShell:
85+
86+
```powershell
87+
Get-ChildItem \<DownloadsPath> | Where-Object { $_.LastAccessTime -lt (Get-Date).AddDays(-30) }
88+
```
89+
90+
1. Make sure that files aren't hidden or are system files or in use.
91+
1. Exclude from antivirus scans:
92+
1. Exclude downloads or relevant folders from routine scanning.
93+
1. If not possible, use "LastWriteTime" in custom scripts as the date attribute for deletion.
94+
1. Manual Run:
95+
To verify the configuration, try a manual Storage Sense run through Windows Settings.
96+
97+
### A Storage Sense scheduled task fails ("Class Not Registered" or other errors)
98+
99+
#### Cause
100+
101+
- OS or feature update bug (for example, removal of SettingSyncStateReporter)
102+
- Scheduled task removed or mismatched
103+
104+
#### Resolution
105+
106+
1. Known benign failures: Errors such as "Class not registered (0x80040154)" can typically be ignored if Storage Sense works manually.
107+
1. Update Windows: Await cumulative updates that fix the issue or reference hotfixes.
108+
1. Re-create task: Not required or possible on affected SKUs. Instead, rely on awaiting product update.
109+
110+
### Files and folders not deleted because of attribute or environmental factors
111+
112+
#### Cause
113+
114+
- Files are hidden or system marked (Storage Sense skips these files).
115+
- Locked or open files (through user sessions or third-party tools).
116+
- Antivirus, backup, DLP, Teams, Sync applications update timestamps.
117+
118+
#### Resolution
119+
120+
1. Unlock or release files:
121+
1. Use Sysinternals Handle.exe or Process Explorer to identify open handles and close them.
122+
1. To release persistent locks, restart the system.
123+
1. File attributes: Make sure that files aren't hidden or system marked (remove the attributes by using PowerShell or Windows Explorer).
124+
1. Environmental exclusions: Exclude the target directory from scans, especially for antivirus.
125+
1. Custom Script for Folders: Use PowerShell to clean up folders and files:
126+
127+
```powershell
128+
Get-ChildItem "C:\Downloads" -Recurse | Where-Object { $_.LastWriteTime -lt (Get-Date).AddDays(-30) } | Remove-Item -Recurse -Force
129+
```
130+
131+
### User profile container or storage quota errors
132+
133+
#### Cause
134+
135+
- User profile containers reach allocated quota.
136+
- File system or share has a nearly full volume.
137+
- Disk error code (for example, 0xC000CF13), "Not enough space available" in user profile folder.
138+
139+
#### Resolution
140+
141+
1. Increase Quota: Adjust the profile or container size through your profile solution or VHD/VHDX management tools.
142+
1. Disk Management: Use Disk Management (diskmgmt.msc) to check and extend volumes.
143+
144+
### Network or file share inaccessibility post change
145+
146+
#### Cause
147+
148+
- DNS cache holding onto old IP for file share after network or storage migration.
149+
- NLB or DirectAccess misconfiguration.
150+
151+
#### Resolution
152+
153+
1. Flush DNS cache:
154+
- ipconfig /flushdns
155+
1. Verify resolution:
156+
- nslookup \<fileshare>
157+
- ipconfig /displaydns
158+
1. Restart client: As a last resort, restart the client to refresh the cache.
159+
160+
### Storage system, journal full, or storage device missing
161+
162+
#### Cause
163+
164+
- USN journal full or hits allocation limits (event log/stacks show journal or cluster errors).
165+
- Disk/LUN not detected after Storage ID change or topology update.
166+
167+
#### Resolution
168+
169+
1. Clear USN Journal:
170+
- fsutil usn deleteJournal /D \<DriveLetter>:
171+
1. Run Chkdsk:
172+
- chkdsk /f \<DriveLetter>:
173+
1. For device issues:
174+
1. Rescan disks in Device Manager.
175+
1. Coordinate with storage vendor for array or device remapping.
176+
1. Restart if the issue remains unresolved.
177+
178+
### Permission denied errors on folders or VM disks
179+
180+
#### Cause
181+
182+
- Incorrect or missing SYSTEM or user permissions.
183+
- Password or credential changes not synced.
184+
185+
#### Resolution
186+
187+
1. Check Permissions:**
188+
- Get-Acl \<path> in PowerShell to verify SYSTEM or full control.
189+
1. Adjust ACLs:** Use **Properties** > **Security** tab or icacls command.
190+
1. Sync credentials: Perform a password change as necessary. Then, verify again.
191+
192+
### Security vulnerability in storage components
193+
194+
#### Cause
195+
196+
- A CVE affects storage (as referenced in cases).
197+
- Awaiting update deployment.
198+
199+
#### Resolution
200+
201+
Apply security updates: Track and install the relevant Windows updates that address the CVE.
202+
203+
## Common issues quick reference table
204+
205+
| Symptom | Root cause | Resolution |
206+
| --- | --- | --- |
207+
| Storage Sense missing on Multi-Session | By-design removal, product bug | Install KB5050092 / KB5051989 if applicable |
208+
| Storage Sense task "Class not registered" | OS component removal/known benign error | Ignore, apply updates, manual run if needed |
209+
| Files not deleted in Downloads | AV touches files, policy not set, only files not folders | Exclude from AV, review GPO/reg, script for folders |
210+
| Cloud files not dehydrating | Attribute (hidden/system), recent access | Unset attributes, check access logs, use non-hidden |
211+
| File share inaccessible after IP change | DNS cache outdated | ipconfig /flushdns; restart if unresolved |
212+
| Profile or folder reports "not enough space" | Quota exceeded, share is full | Increase quota, extend share, clean up space |
213+
| USN journal or storage journal full | Lifetime limit hit | fsutil usn deleteJournal /D \<drive>; chkdsk |
214+
| Hyper-V "access denied" attaching disk | Missing permissions on config directory | Reset SYSTEM/user permissions on the folder |
215+
| Storage not detected after LUN/storage change | Storage IDs mismatch, device hidden | Rescan in Device Manager, reboot, storage vendor support |
216+
| Storage Sense doesn't clean nonsystem drives | Unsupported in current design | Use custom scripts for nonsystem drives |
217+
218+
## Data collection
219+
220+
Before you contact Microsoft Support, you can gather the following information about your issue.
221+
222+
- **Policy/Registry Export:**
223+
- gpresult /h gp.html
224+
- Reg export commands for relevant keys
225+
- **Task Scheduler Snapshots**
226+
- Status and history for Storage Sense task
227+
- **PowerShell for File Metadata:**
228+
- Get-ChildItem \<path> | select Name, LastAccessTime, Attributes
229+
- **Sysinternals Utilities:**
230+
- Handle.exe, Process Monitor (Procmon), Process Explorer
231+
- **Disk Tools:**
232+
- diskmgmt.msc
233+
- chkdsk /f \<drive>
234+
- fsutil usn deleteJournal /D \<drive>
235+
- **Event/System Logs:**
236+
- Storage Sense: C:\Windows\System32\LogFiles\setupcln\setupact.log
237+
- Event Viewer: Application, System, Hyper-V, FailoverClustering logs
238+
- **Network:**
239+
- ipconfig /displaydns, ipconfig /flushdns, nslookup \<host>
240+
- **Profile Quota:**
241+
- Management tools, PowerShell, or solution-specific utilities
242+
243+
- **Command-line reference table**
244+
245+
| Scenario | Sample commands |
246+
| --- | --- |
247+
| GP Verification | gpresult /h gp.html |
248+
| Registry Export | reg export \<key> \<file> |
249+
| File Metadata | Get-ChildItem \<path> / dir /ta |
250+
| Disk Health | chkdsk /f \<drive> |
251+
| USN Journal | fsutil usn deleteJournal /D \<drive> |
252+
| Task Scheduler | Open Task Scheduler app |
253+
| DNS Issues | ipconfig /flushdns / nslookup |
254+
255+
## References
256+
257+
- [Microsoft Storage Sense documentation](/windows/manage-drive-space-with-storage-sense-654f6ada-7bfc-45e5-966b-e24aded96ad5)
258+
- [Known issue KB5050092](https://support.microsoft.com/help/5050092)
259+
- [USN Journal documentation](/windows/win32/fileio/change-journal-records)
260+
- [OneDrive Files On-Demand](https://support.microsoft.com/office/learn-about-onedrive-files-on-demand-0e6860d3-d9f3-4971-b321-7092438fb38e)
261+
- [Sysinternals utilities](/sysinternals/)
262+
- [Group Policy Central Store guidance](/troubleshoot/windows-client/group-policy/create-and-manage-central-store)

0 commit comments

Comments
 (0)