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 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:


  1. Download script source and save locally: GitLab link
  2. Go to Intune and add the Powershell script:
  3. 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.

Leave a Reply

1 Comment on "O4BClientAutoConfig"

newest oldest most voted
Notify of