The new Onedrive for Business client when installed on Windows 10 has a number of options we can use to streamline the user portion of the configuration. I’ve taken information from several sources and written a single “Do It All – Onedrive For Business configuration script” for the Windows 10 Modern Management (Intune MDM Azure AD Join) scenario.
The script can be deployed through Intune and will do the following:
- check latest O4B version, install if needed
- detect O4B configuration, start auto config
- completely silent configuration with SSO
- optionally, enable Files On Demand
- optionally, redirect folders to Onedrive
- optionally, copy old content
Other stuff you’ll like to know:
- The script logs to %APPDATA%\Temp on the local device for the user details
- The script logs to c:\windows\temp for the SYSTEM install portion
- User needs to have an Intune and Onedrive for Business license
- If MFA is enabled the ‘silent’ part won’t apply, but redirection is still applied after the user finishes Onedrive configuration
- User does not need to be local admin
- Script runs at each logon (scheduled task) but is invisible due to a VBS wrapper
Credits / Sources used:
- Deploy the new OneDrive sync client in an enterprise environment
- Use Group Policy to control OneDrive sync client settings
- https://stealthpuppy.com/onedrive-intune-folder-redirection (credits to @Aaron Parker)
- https://osddeployment.dk/2017/12/18/how-to-silently-configure-onedrive-for-business-with-intune/ (credits to @Per Larsen)
- Download script source and save locally: GitLab link
- Go to Intune and add the Powershell script:
- Now assign the added script to a group containing your users4. Click OK, you’re all set!
Note for Office 2016 MDM users: the Intune deployment of Office may conflict if it runs at the same time, this will delay the installation by a few minutes but will not cause issues.