Convert OneDrive to per-machine installation

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

190426-UOD1

Enter name, Description, Publisher, Category

190426-UOD2

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

190426-UOD3

And some requirements

190426-UOD4

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

190426-UOD5

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


Posted

in

, , ,

by

Comments

7 responses to “Convert OneDrive to per-machine installation”

  1. Jerry

    What is the best way to deploy Onedrive with OUT using SCCM in an enterprise environment?

    Like

    1. Well, what do you have to manage your environment? Gpo, maybe another management system, the arguments and command lines are still the same

      Like

  2. steve

    Do you still need to remove the default ‘OnDriveSetup.exe /thefirstsetup’ from the default user profile?

    Like

  3. Rkast

    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).

    Like

    1. 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..

      Like

    2. Rkast

      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.

      Liked by 1 person

    3. 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

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.