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?
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
We attempted to test this method but we ran into an issue where OneDrive was throwing an error stating it could not be run as an administrator. Is there a way to force the process to always run with user permissions and not administrative permissions?
I have found it a bit hit and miss and have disabled the check for some clients until I can test it more thoroughly.
However I think the issue comes down to whether the signed in user account is an administrator or not. Standard user - restarting OneDrive.exe works, runs OneDrive as that user (just tested again now on my own system where I use a Standard user account - worked perfectly). Admin user - restart .exe fails with admin error, regardless of Syncro settings (as described in the post you linked).
Office 365 has a OneDrive monitoring feature. It gives you some good information although it is not for real time use. It gives you much more detail than just whether the service is running or not.
I had forgot we set up a script to set the registry key. What we did was created a custom field for each customer in Syncro and use that to apply the key. We now have that as part of our standard scripts that run on all workstations.