Forum Discussion
OneDrive Files on-demand
hi wingsfan800 Yes — you’re not missing anything. This is expected behavior.
The Group Policy for OneDrive Files On-Demand only enables or enforces the feature.
It does NOT trigger “Free up space” or automatically dehydrate existing local files.
Microsoft does not provide a GPO, Intune setting, or registry key that forces the mass conversion of files to cloud-only.
What You Can Do Instead (Workarounds)
Use PowerShell to Dehydrate Files
You can run:
attrib +U -P "C:\Users\<UserName>\OneDrive\*.*" /S
This marks files as online-only, similar to clicking “Free up space.”
You can push this via:
- Intune script
- GPO logon script
- SCCM
- Manual run
Do NOT run during active sync — do it after OneDrive fully signs in.
Use OneDrive Silent Config + Known Folder Move (KFM)
If your goal is disk cleanup on many devices:
- Enable KFM via Intune/GPO
- Enable Files On-Demand
- Users’ Desktop / Documents / Pictures move to OneDrive and hydrate only what’s needed.
This does not force dehydration but reduces future local data growth.
Deploy per-machine OneDrive (recommended by Microsoft)
Required for consistent Files On-Demand behavior:
https://learn.microsoft.com/onedrive/per-machine-installation