Introduction
When we buy license to use office365 services we have lots of collaboration possibilities. One of the great features is OneDrive. OneDrive gives us the possibilities to backup folders like desktop, documents and pictures what makes the life of working on multiple devices much easier. (e.g., some of this content was written on my iPhone while my device was rebooting and checking my disk)
Sometimes files lock and OneDrive cannot sync or work with the document. What can we do to solve that?
In this example NTFS permissions blew up and I had to fix it to delete the file.
Requirements
- Onedrive KFM configured
- Reboot
- Patience
Error message
Your document is stuck. It cannot open, you cannot delete it, it cannot be renamed. Just stuck!
To fix the issue
Let’s have a good old CMD
chkdsk c: /F /R
Warning: before restarting your device consider if you have the time to wait, as it can take very long time depending on various parameters.
Reboot your device
And with that trick our file(s) are back online and ready to work with again.
To fix the issue using Endpoint Manager
Go to https://endpoint.microsoft.com/
Devices -> Windows -> PowerShell Scripts -> Add
Give it a documenting naming standard
Script can be downloaded here:
Build upon Ben Whitmore’s notification script but with some change in code, as I don’t want attachment to external files. Pictures are encoded.
Also borrowed code from Damien Van Robaeys which encode ServiceUI.exe for breaking out of system context, which was needed in this scenario.
Select a test group.
Click Add
If users have trouble syncing files as specified, add them to the assigned group and save time for your helpdesk by automating it.
User experience
Summary
Using OneDrive as backup and collaboration tool is superb. Sometimes things can go wrong, and we need to know how it can be solved.
Happy testing!
Mattias Melkersen is a community driven and passionate modern workplace consultant with 20 years’ experience in automating software, driving adoption and technology change within the Enterprise. He lives in Denmark and works at Mindcore.
He is an Enterprise Mobility Intune MVP, Official Contributor in a LinkedIn group with 41.000 members and Microsoft 365 Enterprise Administrator Expert.
Mattias blogs, gives interview and creates a YouTube content on the channel "MSEndpointMgr" where he creates helpful content in the MEM area and interview MVP’s who showcase certain technology or topic.
Official Contributor here "Modern Endpoint Management":
https://www.linkedin.com/groups/8761296/