When you enable Configure team site libraries to sync automatically in Intune, OneDrive can take up to 8 hours to mount those libraries. This article shows a simple, once-off script deployment that reduces the wait to minutes by setting the Timerautomount registry value for the user.
Who is this for?
IT admins managing tenants with Microsoft 365 Business Premium (no access to Proactive Remediations). We use a standard Intune PowerShell script assigned to users/devices and run it in the user context.
What the script does
- Sets
HKCU\Software\Microsoft\OneDrive\Accounts\Business1Timerautomountto1(QWORD). - Idempotent and safe to run multiple times; no admin rights required.
PowerShell Script
Use the PowerShell script that sets the registry value to speed up OneDrive automount. The script is designed to run in user context and requires no administrative privileges.
Repo path: M365/Intune/Customers/Bayside Financial Planners/Scripts/OneDrive-speed-up-automounts/onedrive-user-speed-up-automounts.ps1
Prerequisites
- OneDrive is installed and the user is signed in.
- Intune administrative template Configure team site libraries to sync automatically is configured with the desired sites. This script only speeds up the mount; it does not configure which sites to mount.
- Avoid syncing too many libraries to a device due to OneDrive limits.
User experience
After the script is applied, OneDrive will begin syncing the configured Team Sites at the next Windows sign-in. If the user is already signed in, a sign-out/sign-in or a reboot will trigger the sync.
Generally requires two user sign-ins to start syncing the SharePoint libraries.
Deploy with Intune (PowerShell script)
- Go to Intune admin center → Devices → Scripts and select Add → Windows 10 and later.
- Basics: give the script a clear name, e.g. Speed up OneDrive Team Site automount.
- Script settings:
- Script file: upload
onedrive-user-speed-up-automounts.ps1. - Run this script using the logged on credentials: Yes.
- Enforce script signature check: No (or Yes if you sign the script).
- Run script in 64-bit PowerShell host: Yes (recommended on x64 devices).
- Script file: upload
- Assignments: target the intended users/devices.
- Review + create.
Suggested screenshots to include
You can capture and insert the following (update titles/descriptions as needed). Replace the sample image paths below with your own.
Basics page with name/description:
Script settings page showing uploaded file, Run using logged on credentials = Yes, signature check, and 64‑bit host:
Assignments page targeting users/devices:
Validation on a device
After deployment and user sign-in, validate quickly:
- Open Registry Editor: confirm
HKCU\Software\Microsoft\OneDrive\Accounts\Business1containsTimerautomount(QWORD) = 1. - Within minutes, OneDrive should add the configured Team Sites under the user's OneDrive in File Explorer.
Troubleshooting
- If you deployed in system context, the script skips when no active user hive is available. Re-run once a user is logged in or deploy in user context.
- Ensure the user is signed in to OneDrive and the device has the administrative template for Configure team site libraries to sync automatically applied.
Notes and best practices
- This change is user-hive only; it does not require admin/elevation.
- The script is safe to run multiple times; it only writes when values differ.
- Avoid syncing an excessive number of libraries per device to prevent performance issues.
Comments
0 comments
Please sign in to leave a comment.