Automation: Powershell Force OneDrive to Re Sync if there is a Sync Error noted

Olivier Kip 0 Reputation points
2025-02-12T10:10:50.1+00:00

I am working for the MSP Lucrasoft, we use an RMM to automate powershell scripts to workdevices to monitor them.

We get a lot of "OneDrive for Business, error with syncing" alerts. What I always see is that if OneDrive is restarted (manually) the sync is done again and the error is solved.

Do people have a powershell script to "re sync", a script that we can initialize when an alert like this is coming up. So we don't have to manually restart or reïnstall onedrive to solve it

Microsoft 365 and Office | OneDrive | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.