In order to fully control OneDrive updates I was tasked to find a method to disable OneDrive from doing updates on its own.
Given that there is no registry setting or GPO that allow you to disable automatic updates from happening I was forced to look for other methods.
The update check is performed by a Scheduled Task that runs once every day
If you look in the Scheduled Task manager you will find one or two tasks related to OneDrive.
So in order to prevent OneDrive from doing any updates I first tried to delete any tasks related to OneDrive from the Task Sequence.
I add a simple commandline to the last part of my Task Sequence
The commandline was as follows:
powershell.exe -ex bypass -command "Get-ScheduledTask -TaskName *onedrive* | Unregister-ScheduledTask
However that did not work for me.
I then tried to disable the task instead using the following command
powershell.exe -ex bypass -command "Get-ScheduledTask -TaskName *onedrive* | Disable-ScheduledTask
And that did the trick
I guess OneDrive checks to see if the task exists and if so it does nothing, but if the task is not found it will be created.
Do remember that if you disable automatic updates for OneDrive you will have to monitor for any new releases and deploy these to all users in order to keep OneDrive working.