Once upon a time in the automount of OneDrive team sites

Once upon a time in the automount of OneDrive team sites

In this blog, we’ll be talking about how to make sure your team site sync automatically to all your devices within a few minutes. Microsoft offers this option as well, only their solution might take up to 8 hours! Today I’ll show you how to speed up this process. 

For anyone who wants to sync the team site libraries automatically, you can configure it in Intune.  

Okay, not my cup of tea. I feel users should be able to decide which team sites are important for them. Also, It’s very user-friendly to setup.  

Back to the issue at hand, when you configure the sync through Intune, the whole process could take up to 8 hours. While often users need access to a file or folder within minutes. For most businesses, this is an unacceptable timeframe. 

https://docs.microsoft.com/en-us/onedrive/use-group-policy#AutoMountTeamSites

Now there’s an easy way to make your ever-loving customers very happy. As they’ll have access to their files and folders in explorer within minutes! 

All we have to do is change the following registry key through PowerShell. 

Option 1: You can push a PowerShell script in Intune to make sure this registry key is changed.  

PowerShell Script Content: 

reg add “HKCU\Software\Microsoft\OneDrive\Accounts\Business1 /v Timerautomount /t REG_QWORD /d 1 /f 

Option 2:  

If like me, you’re blocking PowerShell… Here’s a quick and easy way to push HKCU changes in the registry while blocking PowerShell! 

Conclusion 

Having easy access files and folders through explorer is still something that a lot of users value. Microsoft’s solution simply takes an unacceptable amount of time for most businesses. If like me, you don’t want to wait 8 hours before having access to your files in explorer… Simply look at the two options I offered above and decides what fits your business best. 

2 thoughts on “Once upon a time in the automount of OneDrive team sites

    1. Hi,

      When the timerautomount is processed once, it will be deleted. But why not creating a script like this? To make sure it is set to 0 at each logon

      $content = @’
      Windows Registry Editor Version 5.00
      [HKEY_CURRENT_USER\Software\Microsoft\OneDrive]
      “SilentBusinessConfigCompleted”=”0”
      “EnableAdal”=dword:00000001
      “EnableTeamTier_Internal”=dword:00000001
      [HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1]
      “EnableADALForSilentBusinessConfig”=dword:00000001
      “TimerAutoMount”=hex(b):01,00,00,00,00,00,00,00
      [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Identity]
      “EnableAdal”=dword:00000001
      [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Common\Licensing]
      “EulasSetAccepted”=”16.0,”
      ‘@

      # create custom folder and write PS script
      $path = $(Join-Path $env:ProgramData CustomScripts)
      if (!(Test-Path $path))
      {
      New-Item -Path $path -ItemType Directory -Force -Confirm:$false
      }
      Out-File -FilePath $(Join-Path $env:ProgramData CustomScripts\onedrive.reg) -Encoding unicode -Force -InputObject $content -Confirm:$false

      # register script to run at logon
      $WshShell = New-Object -comObject WScript.Shell
      $Shortcut = $WshShell.CreateShortcut(“$env:ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\config.lnk”)
      $Shortcut.TargetPath = ‘”c:\windows\System32\reg.exe”‘
      $Shortcut.Arguments = “import c:\programdata\CustomScripts\onedrive.reg”
      $Shortcut.WorkingDirectory = ‘”c:\programdata\CustomScripts\”‘
      $Shortcut.Save()

Leave a Reply

Your email address will not be published. Required fields are marked *