Excluding specific files from being uploaded to OneDrive

This week is another relatively short blog post, again somewhat related to Microsoft Edge. This week, however, is about configuring some specific OneDrive configurations. More specifically, the focus will be on excluding specific files from being uploaded to OneDrive. Not something really new, but the importance became clear again this week. There can be many reasons why organizations might want to exclude specific files from being uploaded to OneDrive, but there are also some generic reasons that are applicable to most organizations. An often heard reason is related to desktop shortcuts. Synchronizing desktop shortcuts (or even shortcuts in general) often results in either duplicate shortcuts or shortcuts to missing applications. Another reason is related to organizational branding in Microsoft Edge. Customizing organizational branding relies on the OneDrive desktop sync and with that the setting to exclude specific files from being uploaded should not be disabled. The combination of those reasons are a great starting point to think about excluding shortcuts from the OneDrive synchronization, by default. This post will look at the required configuration to achieve that starting point, followed with the user experience.

Note: It is also possible to use the setting Block syncing of specific file types in SharePoint admin center. The configuration describes in this post, however, provides a lot more flexibility.

Configuring the exclusion of specific files from being uploaded

The configuration for excluding specific files from being uploaded to OneDrive is actually pretty straightforward when using Microsoft Intune. Mainly because the configuration can be managed via the Settings Catalog. The Settings Catalog contains nearly all ADMX-backed settings for OneDrive. Those settings are backed by the OneDrive.admx. The main setting itself is EnableODIgnoreListFromGPO with Exclude specific kinds of files from being uploaded as friendly name. As an IT administrator this setting is only a few clicks away nowadays and doesn’t require any really challenging configurations anymore. The following 8 steps can be used to exclude shortcuts from being uploaded to OneDrive, by using Settings Catalog.

  1. Open the Microsoft Intune admin center portal and navigate to Devices > Windows > Configuration profiles
  2. On the Windows | Configuration profiles blade, click Create > New Policy
  3. On the Create a profile blade, select Windows 10 and later > Settings catalog and click Create
  4. On the Basics page, provide at least a unique name to distinguish it from similar profiles and click Next
  5. On the Configuration settings page, as shown below in Figure 1, perform the following actions and click Next
  • Click Add settings, navigate to OneDrive and select Exclude specific kinds of files from being uploaded (EnableODIgnoreListFromGPO) in Settings picker
  • Switch the slider with Exclude specific kinds of files from being uploaded to Enabled to exclude specific files
  • Specify *.lnk with Keywords to exclude all links from being uploaded
  1. On the Scope tags page, configure the required scope tags and click Next
  2. On the Assignments page, configure the assignment for the required user or devices and click Next
  3. On the Review + create page, verify the configuration and click Create

Note: For exclusions use complete names, such as “setup.exe“, or use the asterisk (*) as a wildcard, such as *.exe.

Experiencing the exclusion of specific files from being uploaded

After applying the configuration, it is pretty straightforward to verify the behavior and to experience the exclusion of specific files from being uploaded. Simply add a shortcut to a synchronized folder and see what happens. By far the easiest is experiencing a shortcut on the desktop of the user. Below in Figure 2 is an overview of that behavior, including the applied configuration. In the Registry Editor is an overview of the applied configuration via the specified configuration in Microsoft Intune. That results to the configuration in the OneDrive Settings that displays the configured information to the user. The actual behavior is shown in File Explorer as that clearly shows the Status of the file. That status is Excluded from sync.

Note: Users can still upload a file that has been excluded from the sync via OneDrive in a web browser.

More information

For more information about managing OneDrive and file exclusions, refer to the following docs.


Discover more from All about Microsoft Intune

Subscribe to get the latest posts sent to your email.

4 thoughts on “Excluding specific files from being uploaded to OneDrive”

  1. Hi Peter,
    A great thing to avoid duplicates and shortcuts to deleted files!
    One thing to maybe watch out for, is the case where a user had created shortcuts on their desktop at their “primary” PC, but then subsequently need to log on to a different PC. In that case, their shortcuts will not populate on the second PC when OneDrive syncs the desktop folder, so the user may be a bit disoriented by the missing items.
    Not an issue with corp-standard shortcuts as they are usually defined in the default profile, so get picked up the first time a user logs on to a PC.

    Reply
  2. Inise this policy for a lot of clients. The issue I run into is, now there is a red “X” on their onedrive taskbar icon. I wish there was a way to ignore the item rather than exclude.

    Reply
    • Apologies for the late reply, as I was enjoying my vacation.
      Thank you for sharing. I’m not seeing the same. I just created a link on my desktop and I can see that it’s excluded, but there are no exclamation marks. Which version of Windows are you using?
      Regards, Peter

      Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.