Prevent Onedrive From Syncing Duplicate Shortcuts and Links With Intune
Stop OneDrive from Syncing Desktop Shortcuts with Intune
OneDrive is a great tool for keeping end user files synced across devices, unfortunetely, OneDrive has a bad habit of syncing multiple copies of desktop shortcuts across devices. If you have a shortcut to Teams, for example, OneDrive will store that shortcut and try to sync it to the Desktop when you sign into another device. Then you end up with a copy of the Teams.lnk file on your Desktop.
Fortunately, it's easy to stop OneDrive from syncing desktop shortcuts with Intune. Here's how:
Log in to Intune and go to Devices > Windows > Configuration profiles.
Click Create profile.
In the Platform type drop-down menu, select Windows 10 and later.
In the Profile type drop-down menu, select Templates > Administrative templates and click Create.
In the Profile name field, enter a name for your profile, such as Prevent OneDrive Desktop Shortcuts from Syncing. Optionally, enter a description. Then click Next.
In the Configuration settings section, select Computer Configuration, then look through the list and find the setting labeled OneDrive. Select the OneDrive setting to expand all OneDrive related settings.
Now in the search bar, type in "exclude" in order to filter out the setting we want, which is labeled: Exclude specific kinds of files from being uploaded. Select this setting.
Now to configure this policy.
Select the Enabled radio button to enable the policy.
In the Keywords section, we will type in any file extensions or filenames that we want to prevent OneDrive from syncing. To stop syncing all Desktop shortcuts, use the following two keywords: *.url
and *.lnk
. Once you enter those two keywords, click OK to save the setting and then click Next to move on.
Image below is for reference.
Set Scope tags if required, this is optional in most cases, unless your organization makes use of them.
Click Next.
Assign the config profile to the groups you want to apply the policy to.
Click Next.
Review your settings and then click Create.
Once you've created the profile, it will be applied to the groups that you specified. After the profile is applied, OneDrive will no longer sync desktop shortcuts.
Here are some additional things to keep in mind:
-
You can also exclude other file types from syncing by adding their extensions to the keywords list. For example, if you want to exclude all PDFs from syncing, you can add the keyword
*.pdf
to the blocklist. Or if you want to exclude files with a certain name, you can enter that name in the blocklist as a keyword. -
If you need to change the settings of this profile, you can do so by going to Devices > Windows > Configuration profiles and selecting the profile, and navigating to the properties panel of the profile.