check onedrive sync status

Hi everyone.

just started at a new job at an MSP and as part of my role we are checking if users have auto-save turned on in onedrive so the desktop, documents and other important folders are synced

currently this is a long drawn out process as it takes a long time to call each user connect to their machine etc etc.

is there some way we can automate this task so we could get connected to say one machine and run a powershell script to probe each PC on the network some customers have a domain some do not

basically we need to find out

is auto-save enabled
is it working
when was the last sync.
Andy DoeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jose Gabriel Ortega CastroEE Solution Guide/Topic Advisor and CEO Faru Bonon ITCommented:
As you should know by now, there are two onedrives.

Onedrive for business (ofB) and Onedrive

https://blogs.msdn.microsoft.com/rodneyviana/2017/06/06/powershell-cmdlet-to-check-onedrive-for-business-or-onedrive-personal-status/

They talked about Status, but I tried to import the module, and it doesn't' work
so probably it should be recompiled and then used on your computer.

https://github.com/rodneyviana/ODSyncService

----

Another approach would be to create an app registration, and try https://www.powershellgallery.com/packages/OneDrive/1.1.3
but It not worth the pain.

If it's just Onedrive for business:
https://docs.microsoft.com/en-us/onedrive/list-onedrive-urls

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.