Jump to content
grouchy.oscar

Microsoft OneDrive Sync

Recommended Posts

I have implemented a very basic check that makes use of the OneDrive lib DLL file and powershell. Not at my desk but will share it later on today. 

Share this post


Link to post
Share on other sites

@digitalmess @etaylor @grouchy.oscar


I'm sure there's all sorts of better ways to handle it, but here's our current setup.

Based off of this article, at the bottom you'll find an example of the output: https://blogs.msdn.microsoft.com/rodneyviana/2017/06/06/powershell-cmdlet-to-check-onedrive-for-business-or-onedrive-personal-status/

1. Save OneDriveLib.dll to Automate server transfer directory.

https://github.com/rodneyviana/ODSyncService/tree/master/Binaries/PowerShell

2. Create Automate script. The PowerShell must be run in the logged-on user context.

image.thumb.png.23ac7cf676099a6cc58abc35aa36e654.png

 

Share this post


Link to post
Share on other sites

@lgs141

 

I was looking at that over the weekend as well. There is one issue with that solution, if you enable FilesOnDemand it will show the solution as "Not Installed".

Share this post


Link to post
Share on other sites

@lgs141

Thanks, we played with that, but it just doesn't provide good feedback. Like we'd want to know if there's a file conflict when enabling protected folders. Or like etaylor said, it shows "NotInstalled" or we had another error reported when sync'ing was happening. Forget what the specific message was but it indicated that it was not configured. For now the best we found is to roll out the registry keys for automatically enabling OneDrive Sync, Protected Folders, and cross check the LastLoggedIn key. Maybe when I get adventurous enough, I'll work on something that utilizes the SyncDiagnostics.log file and breaks down results. %localappdata%\Microsoft\OneDrive\logs\Business#\SyncDiagnostics.log

 

Share this post


Link to post
Share on other sites

Hi @lgs141

I have got this working on my own laptop. In that the output of the powershell gets pushed to a variable %StatusOutput%. How do I then make the results actionable if the status contains "Error"? 

Kind regards,

Share this post


Link to post
Share on other sites

So using some powershell I can search the output for the work "error". But machines that are not syncing all files down to the computer are reporting they are in an error state. Anyone have any suggestions?

Share this post


Link to post
Share on other sites

@Dave M I did get this going. I had two monitors. One that checked that OneDrive.Exe is actually running as a process. As on W7 it will just randomly stop. I then had another script that twice daily would import the above OneDrive.dll and check the result. If the result was "failed" it would then send an email and create a ticket so then my helpdesk crew could ring the user and be a hero. However, we then started deploying W10. The OneDrive client is WAY more reliable in W10. Massive improvement. So all we were getting was false positives. I don't think the OneDrive.dll was written for W10 and as such I wouldn't say it worked properly (I guess hence all the false positives). Since we are now 80% W10 I have turned it all off. So my advice would be to get all your machines onto W10! I would still love to have something that monitored the status of SharePoint Online folders but I cannot find anthing that will do it with W10 accurately.

Share this post


Link to post
Share on other sites

@TechnicalHero We're also to the last of our 7 machines.

That being said, and while I agree that it works far better on 10, it would still be amazing to be able to tell if it's in a Red status proactively.

I guess the search continues.

 

Share this post


Link to post
Share on other sites
On 11/13/2019 at 11:26 AM, TechnicalHero said:

@Dave M Absoutely. I can't think why MS wouldn't have some kind of tool or feature built in to the client out the box for this. If you ever come up with something please do share!

I'd even settle for them creating event logs for sync results. Seems crazy to me that they don't log anything for this product.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...