Forum Discussion
OneDrive Files on-demand
Hello, I was wondering if anyone has some insight around OneDrive files on-demand. I found that clicking the button to free up space works just fine and all of my items switch to cloud unless I am accessing something, however, when I try to implement this via group policy, I can see the policy is being pushed because the files on-demand section of settings is now grayed out but it is not uploading everything to cloud. In fact, nothing seems to change like it does when I was able to click the button. We have tried this on multiple computers and get the same results. No GPO and the button works fine, with GPO, it's grayed out but doing nothing. Am I missing something with the GPO to force that upload to cloud? Any help with this would be greatly appreciated. Thanks!
1 Reply
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