OneDrive for Business synchronized files from SharePoint Online with your local file storage. So you can work with this files on- and offline. This mechanism is very robust. Nevertheless, it can happen that the synchronization stops: affected folder are marked with a red cross – synchronization problems with Office 365 are occurred.
It’s helpful to clear the OneDrive cache and rebuild it (do not delete the synchronized folder structure – this can cause in a loss of your files on SharePoint!).
The following script terminates the OneDrive for Business related processes and clears the cache. Then you must restart the OneDrive for Business app again. Note: All subscribed folders will be synchronized from scratch.
Use at your own risk.