I recently updated my Update-OneDrive.ps1 script on GitHub to update to the latest OneDrive version and convert current installation to per-machine installation. Have a look and any feedback and contributions are welcome!
This script will take care about your current running machines and can be deployed by PowerShell script or win32-application.
Implementation with Intune Win32 app
Start by creating Win32-app in Intune portal, select the intunewin app and press ok
Enter name, Description, Publisher, Category
Now time for some install commands, write the following
Install command: PowerShell.exe -ExecutionPolicy RemoteSigned -WindowStyle Hidden -NoLogo -File .\Update-OneDrive.ps1
Uninstall command: cmd /c
Install behavior: User
And some requirements
The detection rules might look like this, this makes sure one user per machine runs the application
Path: %ProgramFiles(x86)%\Microsoft OneDrive
File or folder: OneDrive.exe
Detection method: File or folder exists
and press Add to save and upload the application, wait until the application has been uploaded and Assign the application to a group
Troubleshooting and logging
Make sure you deployed the application to user
The script will do some logging in the %Temp% folder, called AutomateOneDrive.log
Make sure when entering the install command, the PowerShell arguments is in the correct order, if -ExecutionPolicy is after -File it will not work and the application installation will fail
References and other posts
Ingest OneDrive group policies manage settings in an awesome Intune way
What is the best way to deploy Onedrive with OUT using SCCM in an enterprise environment?
Well, what do you have to manage your environment? Gpo, maybe another management system, the arguments and command lines are still the same
Do you still need to remove the default ‘OnDriveSetup.exe /thefirstsetup’ from the default user profile?
Cool script. Per also wrote a script for this but not as intelligent. Only thing about your setup that worries me is, what if user is not local admin (cause you deploy it to users).
Hi! Thanks for commenting. If you use the Win32 I should work. I have some thoughts about handle that scenario as well but I run into some trouble when I had later version on my machine that I downloaded..
Thanks for your reply sir 🙂 Going to test it out at customer. Deploy it as win32 to user without admin rights! Keep up the great blogs.
LikeLiked by 1 person
actually, the script is written in a way if you happen to run as System, it will try to download the latest version and execute with allusers parameter. Cannot garantuee it works but the code is there – Test and come back 🙂
as long as there are no later version installed on the machine it should work