Basics of OneDrive Group Policies

November 24, 2023
14 min read

Should I Change Group Policy Settings in OneDrive for a Small Company?

Group policies for my small company? Isn't that shooting sparrows with cannons?

No, regardless of whether you have 5, 10, 500 or 3000 users. The basics are the same for everyone. Only the deployment differs. In this article, I’ll only describe the rollout of group policies, without the big deployment tools.

You’ll learn how to equip computers with OneDrive group policies. Then you’ll learn to carry out these steps:

  1. Individual group policies can be activated.
  2. Activated group policies must be tested and perhaps modified.
  3. The changes are then exported.
  4. The exported data can then be imported to other devices.

Of course, this only makes sense if the number of devices is low. Only steps 1-3 are necessary to test the group policies on a local device.

Changing OneDrive Group Policy Prerequisites

You must be running Windows 10/11 Pro or higher. The group policies do not run under Windows X Home. You therefore need Windows X Pro.

The tools you need include the Local Group Policy Editor, the Registry Editor, and Notepad. The first two come with Windows 10/11 Pro or higher. You also need a USB stick to distribute the changes.

Some administrators will ask themselves, “Why should I use one or the other OneDrive group policy for a handful of employees?” One example of this is that you can give instructions to use “Files OnDemand,” but this is then ignored by employees. With a group policy, however, you can enforce the instruction, and the employee cannot change this setting. Some group policies really make sense and that's exactly why I wrote this article.

Where Can I Find the Group Policies for OneDrive?

Almost all group policies for Windows can be downloaded from Microsoft sites, but not the OneDrive group policies. Microsoft distributes OneDrive group policies automatically with every installation of OneDrive or every update of the sync client. There are only eighteen files with a total size of 1.1 MB, which is almost nothing compared to the complete OneDrive update of 277 MB.

Where Can I Find the OneDrive Sync Client Under Windows?

The answer of course is, “It depends.” There are three versions of the OneDrive app for Windows. A 32-bit version, a 64-bit version and a version for ARM processors. When installing Windows, it therefore depends on which processor you have in your device; and the correct setup is supplied for Windows. Of course, other (newer) setups may have been made by the administration when the image was created.

This means that you can look into the depths of the operating system on any device with OneDrive installed.

The image shows the OneDrive program and configuration files that were originally installed in the user directory. Programs, DLLs, and images could also be found in the user directory.
Figure 1: The OneDrive program and configuration files were originally installed in the user directory. Programs, DLLs, and images could also be found in the user directory. | Image copyright Hans Brender | View Full Size

 

In the early days of the OneDrive Sync Client, the program itself, the configuration, and the logs were saved in the user directory:

C:\Users\[User]\Appdata\local\Microsoft\OneDrive\

Initially, OneDrive was a 32-bit program with its corresponding DLLs as well. On 8/4/2021, Microsoft delivered the preview of the 64-bit program with version 21.062.0328.0001.

Later, the somewhat protected version was used, and the programs can be found in the respective folders such as:

C:\Program Files x86\Microsoft OneDrive\ for the 32-bit version, or

C:\Program Files\Microsoft OneDrive\ for the 64-bit version.

This installation path is also referred to as device installation, which can be useful if, for example, several users share one device. This reduces the volume and time considerably, as only one installation is installed and not several. This installation path also applies to the automatic update (approx. 274 MB) of the Sync Client.

This image shows where the programs and configuration files are stored on Windows 10 and Windows 11 machines today. Most files are in the Program Files directory while configuration and setup files are in the User directory.
Figure 2: This picture shows where the programs and configuration files are stored on Windows 10 and Windows 11 machines today. Most files are in the Program Files directory while configuration and setup files are in the User directory. | Image copyright Hans Brender | View Full Size

These tables describe where to find OneDrive programs and the configuration files:

Installed in the users directory 
So the programs...Programs and DLLs
Logo Images
Updater
Update Files
OneDrive.exe 
Group Policies
As well as the configuration of:

Logs

Settings
Setup

Installed in the users directory 

So the programs...







As well as the configuration of:

Programs and DLLs
Logo Images
Updater
Update Files
OneDrive.exe 
Group Policies

Logs

Settings
Setup

or
 

Under Program (32Bit / 64 Bit) 
So the programs...Programs and DLLs
Logo Images
Updater
Update Files
OneDrive.exe 
Group Policies
And the configuration in the user directory:

Logs

Settings
Setup

Under Program (32Bit / 64 Bit) 
So the programs...Programs and DLLs
Logo Images
Updater
Update Files
OneDrive.exe 
Group Policies
And the configuration in the user directory:

Logs

Settings
Setup

This screenshot shows the Explorer path for the programs and configuration files for OneDrive in the User directory.
Figure 3: Shows the Explorer path of the programs and configuration files for OneDrive in the User directory. | Used with permission from Microsoft | View Full Size

When we see where the programs are in Explorer (Figure 3), we are not far from the group policies. A double-click on the currently installed version of the OneDrive client opens a large library of 916 files in 150 folders (274 MB). And inside the top directory "adm" are the group policies.

Group Policies Are Made Up of Two Components

Look at Figure 4 as you digest the information in this section.

  • A file that contains the processing for Windows (OneDrive.admx) (1).
  • A file listing the explanation (OneDrive.adml) (2).
Description files for OneDrive.admx and OneDrive.adml plus group policies in seventeen different languages can be found in the adm folder.
Figure 4: The contents of the adm group policy folder include the OneDrive.admx and OneDrive.adml files mentioned above. Each GPO is a binary file and description file. | Used with permission from Microsoft | View Full Size

Figure 4 shows that you can find the explanations for the OneDrive group policies in seventeen languages (3). Depending on the installation and the languages added, if you want to change a default group policy, you must use an adml file for each language. In my example below, I’ll discuss the American language and the German language version of the adml files.

Copy Action

For a group policy to be executable, the admx and adml files must be copied to the Windows folder C:\Windows\PolicyDefinitions. To do this, you also need admin rights on the device where you want to try it out. In medium-sized and large companies, the rollout is carried out from a central store with programs such as Microsoft Intune. Figure 5 shows the modified files in a local installation.

Explorer view of the PolicyDefinitions folder in Windows. You need to copy admx and adml files to this folder, replacing files with the same name if they exist.
Figure 5: Explorer view excerpt from the PolicyDefinitions folder, with the folders for the explanation files for the installed countries; here German and English. | Used with permission from Microsoft. | View Full Size

OneDrive.admx (1) must be copied to the PolicyDefinitions(4) folder. If a file with the same name already exists, it must be overwritten.

The English-language OneDrive.adml (2) must be copied to the folder (en-US) below the PolicyDefinitions folder (5). If a file with the same name already exists, it must be overwritten.

The same procedure must be followed for the country-specific variants (in this case German). The German-language OneDrive.adml in the de folder (3) must be copied to the German-language folder (de-DE) below the PolicyDefinitions folder (6). If a file with the same name already exists, it must be overwritten.

This shows the copy action in table form.

File from folder admDestination path
  1. OneDrive.amdx
(4) C:\Windows\PolicyDefinitions\
  1. OneDrive.adml
(5) C:\Windows\PolicyDefinitions\en-US\
Optional another language, here German 
  1. de\OneDrive.adml
(5) C:\Windows\PolicyDefinitions\de-DE\

Local Group Policy Editor

Now you can start the Local Group Policy Editor. To do this, type "Edit Group Policy" in the search window and start the program in the Local Group Policy Editor as shown in Figure 6.

The Local Group Policy Editor with installed OneDrive group policies for the device as well as for the local user.
Figure 6: The Local Group Policy Editor with the OneDrive group policies for the local device and the local user. | Used with permission from Microsoft. | View Full Size

Group policies work either for the respective device (1) and/or for the respective user (3). There are therefore two areas (1+3) where these OneDrive group policies can be displayed.

Basics of How a Group Policy Works

A group policy has three states:

  • Not configured
  • Enabled
  • Disabled

Some group policies do not need to be configured; they have a default setting. If a group policy is activated, you must first pay close attention to the meaning of the name, as some group policies prohibit something, and some allow something. Figure 6 shows some group policies with the status "Enabled", many with the status "Not configured." To activate/deactivate a group policy, select the group policy and double-click on it. I’ve opened one to edit in Figure 7.

The screenshot shows the Use OneDrive Files On-Demand group policy with the numbers in green circles designating the group policy name (1), the respective state (Not Configured, Enabled, Disabled) (2) and the Help description (3).
Figure 7: The Use OneDrive Files On-Demand group policy with the name, the respective state (Not Configured, Enabled, Disabled) and the Help description. | Used with permission from Microsoft.

Note: This article deals with the basics of group policies, but not with individual OneDrive group policies. Those are described in other articles.

Testing the Activated/Deactivated Group Policies

If you have decided to use OneDrive group policies and then roll them out, this is actually the most important part. Testing.

Many OneDrive group policies are active immediately, some require a reboot, others have a delayed effect depending on the settings. It is important to log the result (screenshots) because otherwise users will be surprised by the changes if they are not communicated to them.

Windows Registry

Where are the group policy settings saved?

If a group policy is active, the question arises as to where these states are saved. The answer is quite simple: In the Windows registry of every Windows device.

The registry is the database that Windows needs to function properly. It contains not only the settings to different drivers for the respective device, but also all installed programs or apps can be found here, as well as all group policies, not just those of OneDrive. So here is a warning:

Unintentional changes to the registry database can result in your device no longer starting. So be careful when manipulating the registry.

Why do we need the registry for our scenario?

A partial export of the data generated with the group policies can be exported with the registry editor and re-imported on another device. The effort is therefore only worthwhile if there are only a few devices involved. If you use Microsoft Intune (cloud) / Microsoft Configuration Manager (on-premises) or a similar program, which distributes the group policies set there, you can skip the registry information.

The registry has five different branches:

  • HKEY_CLASSES_ROOT
  • HKEY_CURRENT_USER → HKCU
  • HKEY_LOCAL_MACHINE → HKLM
  • HKEY_USERS
  • HKEY_CURRENT_CONFIG

The descriptions of the group policies on Learn.Microsoft.com shows you where the OneDrive group policies are stored in the registry.

Go to the tabular listing of OneDrive group policies sorted by STRING_ID.

When I was interested in the group policies, I naturally found the group policies descriptions page I just mentioned. I had a look at the German description. And compared it with the German group policy editor. And none, really none of the group policies matched.

Why?

If the Microsoft OneDrive product group in Redmond has thought about how to make life easier for administrators with a function, then they should talk to the Windows product group. The Help should describe exactly what a group policy should do when it is implemented in Windows. A programmer probably gives the new group policy a name. (And that's why some names are so cryptic).

Since Windows supports different languages, this group policy name and the description are then translated into the different languages by the Windows team. The people in the OneDrive product group wrote down the functionality with the technical writers in Learn.Microsoft.com == Github. Up to this point, everything still worked. But then this page (https://learn.microsoft.com/en-us/sharepoint/use-group-policy#continue-syncing-on-metered-networks) was translated by the technical writers' team using an automatic program to this page in German (IT-Administratoren: Verwenden von OneDrive-Richtlinien zum Steuern von Synchronisierungseinstellungen - SharePoint in Microsoft 365 | Microsoft Learn). We had one English-language version that was correct, but sixteen automatically translated versions that didn't fit at all. Different teams, different programs. Different translations. And the chaos for the OneDrive group policies was perfect. I then thought about what similarities there were. There is only one binary file (admx), but different translated files, and the only common element of these XML files is the string id. See Figure 8.

This image shows the color representation of a group policy in XML (on the left) and in the group policy editor.
Figure 8: This image shows the color coding of what is in the XML file and what it looks like in the group policy. | Used with permission from Microsoft. | View Full Size

Figure 9 shows the German representation:

The representation of the “Use OneDrive Files On-Demand
Figure 9: The representation of the “Use OneDrive Files On-Demand" string in the German XML file. | Used with permission from Microsoft. | View Full Size

Microsoft then took up this idea to use string IDs (which are equal in all languages) to make the current page suitable for all languages. Unfortunately, there are now many errors on this page and there are no Group Policy Translation Guidelines, but I have been assured that there will be an update.

Making the OneDrive Registry Edits

Once again, in addition to abbreviations on the Microsoft site:

HKCU are all the settings that apply to the user, while HKLM refers to the device.

Back to the registry. In the search field next to the Windows icon, type "Registry Editor" and then press Enter. You’ll see Figure 10.

View of the branch in the registry editor that shows the user group policies for OneDrive.
Figure 10: A branch in the Registry Editor with the view of the user OneDrive group policies. | Used with permission from Microsoft. | View Full Size

Figure 10 shows OneDrive registry settings for the current user. The left-hand side shows the structure, and you can move there manually, or enter the following line at the top (the line below the menus) and press Enter.

Computer\HKEY_CURRENT_USER\Software\Policies\Microsoft\OneDrive

From the File menu choose Export and save the branch: OD Current User.reg

Files with the extension .reg are simple text files and can be opened with Notepad.

Notepad shows the exported file of the OneDrive group policy for users.
Figure 11: Notepad shows the branch of the group policy installed here for users. | Used with permission from Microsoft.

Figure 12 shows an active group policy for the local machine.

View of the branch in the registry that shows the device group policies for OneDrive.
Figure 12: Registry Editor shows the branch (1) of the device configuration for OneDrive (2) and all active group policies (3). | Used with permission from Microsoft. | View Full Size

Similar to the previous example (below Figure 10), navigate to:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive

From the File menu choose Export and save the branch as shown in Figure 13: OD Local machine.reg

Notepad shows the exported file of the OneDrive group policy for devices.
Figure 13: Notepad shows the exported Local Machine OneDrive device group policies from the registry. | Used with permission from Microsoft.

Combine the Exported Current User and Local Machine Reg Files

You can combine both files to save time later when importing. To do this, copy the header from (1) and then the contents of (2) and (3) into a new file (see Figure 14) and save the new file: OD User AND Local Machine.reg

The image of OneNote shows the summarized (combined) registry entries from OneDrive.
Figure 14: The figure shows the summarized (combined) registry entries of OneDrive. | Used with permission from Microsoft.

You save this file on a memory stick, on a network drive, if available, in OneDrive for Business or a document library on SharePoint, where all other users also have access.

Roll-out for Small Companies

Remember I said near the beginning of this article that this technique is only suitable for small companies. Because now you have to log in as a local administrator on each device, call up the Registry Editor and import the file OD User AND Local Machine.reg. Then reboot because some group policies require this. Done. Then it's off to the next computer.

Summary

There are other settings in the Windows registry for OneDrive group policies. I will describe these in future articles on specific OneDrive group policies here on Tekkigurus.com. However, if you deploy with Microsoft Intune or similar tools, you can, as mentioned at the beginning, forget the information with the registry.

As an administrator, however, you should use a separate computer and test the group policies locally on your test computer before you implement these group policies for others. Suggestion: If you switch to the OneDrive Insider Ring, you will have more time for testing and implementation of new or changed group policy changes from the OneDrive team.

Tools you need:

  • Group Policy Editor
  • Registry Editor
  • Notepad

Links to Other Group Policy Articles

Hans Brender

Hans Brender

Hans Brender is a Collaboration Specialist and has been a Most Valuable Professional (MVP) in Germany for 11 years. Most people around the world know him as Mr. OneDrive. For the last 11 years he has been talking about OneDrive and collaboration around the world at conferences like Microsoft Ignite, Microsoft Build and local community events. These days he is networking, mentoring, leads a monthly live show about M365 news and gives workshops to the community, mid-size- and Enterprise companies.

In addition to the social profiles below, you can find Hans at: @hansbrender.bsky.social