Forum Discussion

Paul Cunningham's avatar
Paul Cunningham
Steel Contributor
Mar 09, 2017

Syntax for Onedrive.admx edits - DefaultRootDir

In the Onedrive deployment guidance we're instructed to edit the Onedrive GPO template (Onedrive.admx) to insert specific values.

 

For example, replacing {INSERT YOUR TENANT'S GUID HERE} with our actual tenant GUID.

 

The GUID part is easy, but the next customization is replacing {INSERT YOUR CHOSEN PATH HERE} with the desired path for the DefaultRootDir, i.e. the path you want Onedrive to sync to locally when the user runs through the first time setup.

 

My notes from BRK3081 at Ignite show a recommendation to use "%userprofile%\Onedrive - CompanyName" or a %userprofile% path.

 

I've had lots of success with Onedrive deployment by not enforcing that DefaultRootDir in Onedrive.admx, and just enforcing the DisableCustomRoot option instead. So the desired outcome of Onedrive syncing to %userprofile% is met, because users can't select a different location.

 

But I've had no success with enforcing the DefaultRootDir via GPO. Any attempt to use variables like %userprofile%, or C:\Users\%username\etc, or any other variable, fail during user setup of Onedrive.

 

Example:

 

 

So my question is really, what values or syntax will work for {INSERT YOUR CHOSEN PATH HERE} in the DefaultRootDir config in Onedrive.admx?

  • Hi Paul,

     

    With the latest versions of OneDrive (0815 and beyond), we'll no longer require direct modifications to the file to enable tenant default directory settings. Admins will be able to add these settings directly in Group Policy Editor. Furthermore, ADM packages will ship with the OneDrive client installation (%localappdata%/Microsoft/OneDrive/<build version>/adm) to ensure client version to ADM package mapping. 

     

    Let me know if you're able to try out the new ADM package and if it works for your scenarios. Currently, 0830 version has shipped to production customers which has these changes. We're working on updating our public documentation this week. 

    Thanks,

    Ronak 

  • Dean_Gross's avatar
    Dean_Gross
    Silver Contributor

    I was just having this exact discussion with my client earlier this week. We have not been able to get it work either.

     

    On a related note, how many GPOs do you create? I am thinking that 3 - one for User Configuration, one for Computer config and one for Folder redirection, will provide long term maintainability, but we are having some deployment problems, and I'm wondering if it would be better to just have one. Any thoughts on this would be appreciated.

    • Paul Cunningham's avatar
      Paul Cunningham
      Steel Contributor

      I'll have an article out next week about my approach, but in summary, let's say there's one folder redirection policy already in place. I'll create one Onedrive GPO, that contains settings to create a custom environment variable, create the Onedrive sync folder, set the Onedrive settings, and change the folder redirection to the new location (including moving the data). The GPOs are filtered/denied etc so that when users are added to the appropriate group the old one stops applying and the new one applies instead.

       

      Separating them makes sense if it's a more complex environment or requirement, but for most cases the "migration" to Onedrive just  becomes a matter of dropping users in the group, advising them to launch Onedrive and complete initial setup, and monitoring network impact.

Resources