Restarting onedrive using process monitoring/ scripts

Hi I m trying to set up a Process & Service Monitor Policy that will start onedrive if the process has been stopped. but when I set it up I get a message saying “onedrive cannot be run using full administrator rights”

I get the same when I try to start the onedrive process using a script.

I am running as current user.

Is thwere a way to set up syncro to automatically restart onedrive when it has crashed/ been closed down?

I did some of the heavy lifting for this and found commands line switches and put them in this module

Or on psgallery PowerShell Gallery | Onedrive-client 0.2.2

It isn’t very polished, but you can get-odclient to tell if it is configured yet (and possibly group policy reg keys to SSO if necessary), stop-odclients and start-odclient

Unfortunately, with the Syncro backend I think you would have to just put it in a scheduled script once every X (hour?) So most of the time it should do nothing, but clutter up the script view of the asset.

Would be a prime candidate for something like Intune Proactive Remediations though