How to force OneDrive to synchronize?

Solution 1:

Solution:

onedrive.exe /reset

onedrive.exe is located in %localappdata%\Microsoft\OneDrive\.

Solution 2:

To resolve the issue you can try these solutions:

Solution 1) Disable Files on demand option

Go to Options => Files on demand => unselect Save space and download files as you use them

In my situation it was caused the issues with onedrive synchronization by this option.

Solution 2) When you have Files-on-demand grayed out and you can disable GPO Policy:

Disable the option in GPO policy:

enter image description here

Solution 3) When you have Files-on-demand grayed out and you cannot disable GPO Policy:

This allow you to sync main directory and sub directories:

enter image description here

You can try to Disable in the registry (but it might be overwritten in future by GPO update.

set: FilesOnDemandEnabled to 0 in this branch:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive

Solution 3:

For my case, I have tried this to commands:

%localappdata%\Microsoft\OneDrive\onedrive.exe /shutdown
start %localappdata%\Microsoft\OneDrive\OneDrive.exe /background

Inspired from this answer.

If you need to reset/update OneDrive, I have check this link:

%localappdata%\Microsoft\OneDrive\onedrive.exe /reset