Stop OneDrive from Syncing Unwanted Folders: Microsoft Adds Admin-Controlled Folder Exclusions

7 min read

Stop OneDrive from Syncing Unwanted Folders: Microsoft Adds Admin-Controlled Folder Exclusions


By Narasima Perumal Chandramohan

Microsoft MVP (10+ Years) | Co-Founder & Technical Lead, Apps4.Pro

When OneDrive syncs every folder inside a work area, it can also pick up files that were never meant for cloud storage. Development dependencies, local tools, cached files, and machine-specific configurations can add unnecessary storage use and create avoidable sync activity.

Microsoft has introduced a more targeted way to manage this challenge. The new OneDrive folder exclusion capability allows administrators to keep selected folders on a device while continuing to sync the files that truly need cloud access, backup, and collaboration.

With this update, organizations can take greater control of OneDrive sync behavior and prevent local-only folders from being uploaded to OneDrive or SharePoint.

What Is the New OneDrive Folder Exclusion Feature?

Microsoft’s new OneDrive folder exclusion policy allows administrators to prevent folders with selected names from syncing to the cloud. When a folder matches an exclusion rule, it remains on the local device along with its contents.

This gives IT teams more control over folders that are useful on a workstation but unnecessary for Microsoft 365 cloud storage. It is especially valuable on developer devices, IT admin endpoints, and systems that create large volumes of temporary or dependency-related content.

Instead of asking users to move folders manually or restructure their working locations, administrators can define a consistent policy for local-only content.

The feature can help organizations:

  • Keep selected folders and their contents on the device
  • Reduce unnecessary OneDrive storage consumption
  • Limit sync activity caused by frequently changing local files
  • Improve governance for developer and IT admin endpoints
  • Maintain a cleaner OneDrive and SharePoint environment
  • Apply a more consistent sync policy across managed devices

Folders such as node_modules, PowerShell modules, Visual Studio configuration folders, local caches, and build-output folders are common examples of content that may not need to be synchronized.

Why This OneDrive Sync Update Matters

OneDrive is designed to make work files available across devices while supporting cloud backup, collaboration, and access from Microsoft 365. However, not all data created within a synced location needs to be stored in the cloud.

Some folders contain local dependencies, generated files, application settings, or temporary content. These folders can change frequently, consume storage, and create sync activity without providing meaningful collaboration value.

The new folder exclusion setting helps create a more intentional approach to OneDrive storage management. It allows organizations to decide which folders should remain local and which files should continue to benefit from cloud sync.

This can be useful for teams working with:

  • Software development projects
  • PowerShell scripts and automation tools
  • Visual Studio and other integrated development environments
  • Application-generated folders
  • Build artifacts and package dependencies
  • Local configuration and cache directories
  • Device-specific technical resources

By excluding unnecessary folders, organizations can improve the quality of their OneDrive environment without affecting the sync experience for business documents, project files, and collaboration content.

💡 What Is Filling Your OneDrive?

Start a quick discussion to identify folders that create unnecessary OneDrive sync activity.

Ask your audience:

Which local folder creates the most unwanted OneDrive sync activity?

Examples:

  • node_modules
  • PowerShell modules
  • Build-output folders
  • Local cache folders
  • IDE configuration folders

Use this question as a LinkedIn poll, customer newsletter prompt, or IT team survey. The responses can help identify folders worth reviewing for OneDrive exclusion policies.

How OneDrive Folder Exclusions Work

The OneDrive folder exclusion feature is based on complete folder names. Administrators specify the folder names that should not be uploaded, and OneDrive checks new folders against the configured exclusion list.

If a folder name matches the policy, OneDrive keeps that folder and its contents on the device. The folder is not uploaded to OneDrive or SharePoint, and OneDrive does not display a sync error for the excluded content.

For example, if node_modules is included in the exclusion policy, a new folder named node_modules inside a OneDrive-synced location remains local rather than being uploaded to Microsoft 365.

Important behavior to understand

  • Folder-name matching is not case-sensitive
  • Complete folder names must be used for the exclusion list
  • Wildcards are not supported for folder exclusions
  • Matching folders remain available locally on the device
  • Content added to a matching local folder is excluded from sync
  • Existing content that is already synced is not automatically removed from OneDrive or SharePoint
  • Files that are already syncing cannot be moved into an excluded folder as a supported method of removing them from cloud sync
  • OneDrive must be restarted after policy changes for the updated rules to apply

The policy works best when it is planned before users begin creating or storing content in those folders. This helps ensure that local-only folders are excluded from the start rather than requiring manual cleanup later.

Planning Your OneDrive Exclusion Policy

The folder exclusion feature does not change OneDrive behavior unless an administrator configures it. Organizations that do not need this capability can continue using OneDrive with their existing sync settings.

For organizations that want to exclude specific folders from OneDrive sync, a structured review process can help prevent accidental exclusions and improve adoption.

Recommended implementation checklist

  • Identify folders that are local-only and do not need cloud storage
  • Review developer, automation, scripting, and application-generated folders
  • Confirm that excluded folders do not contain business-critical or regulated information
  • Avoid excluding generic folder names that may contain valid user documents
  • Test the policy with a small group of technical users before wider deployment
  • Restart OneDrive on pilot devices after deploying or modifying the policy
  • Confirm that new matching folders remain local and are not uploaded to OneDrive or SharePoint
  • Update endpoint-management documentation with approved folder exclusions
  • Inform help-desk teams about the expected user experience
  • Explain to users that excluded folders are not protected by OneDrive cloud sync
  • Review whether local backup requirements apply to the excluded content

A planned approach is important because content excluded from OneDrive remains only on the device. If that device is lost, replaced, damaged, or reset, the excluded data may not be available through OneDrive unless another backup process is in place.

⚠️ Would You Sync This Folder?

Create a quick visual quiz for a carousel post, email, or webinar poll.

Would you sync this folder to OneDrive?

  • node_modules
  • PowerShell modules
  • Application caches
  • Build-output folders
  • Business project documents

Closing message:

Sync files that need cloud access and collaboration. Keep selected machine-specific folders local.

Important Limitations to Know

The OneDrive folder exclusion policy is useful for preventing new matching folders from being uploaded. However, it is not designed to automatically clean up folders that have already been synced.

Organizations should understand these limitations before adding the policy to their OneDrive governance strategy.

Folder exclusion rules do not do the following

  • They do not automatically remove folders that are already synced to OneDrive or SharePoint
  • They do not support wildcard patterns for folder names
  • They do not provide a user-controlled method for adding or removing exclusion rules
  • They do not support moving already-synced files into an excluded folder to stop cloud sync
  • They do not replace a broader local backup strategy
  • They do not protect excluded files through OneDrive cloud storage
  • They do not replace file-type exclusion policies where file-level filtering is required

Existing synced folders and files are not affected when a folder exclusion rule is configured.

Final Thoughts

Microsoft’s OneDrive folder exclusion update gives organizations a more precise way to decide what should be synchronized and what should remain local. It is especially relevant for IT teams supporting developers, automation specialists, technical workstations, and users with application-generated folders.

By keeping unnecessary local-only folders out of OneDrive sync, organizations can reduce unwanted storage use, limit sync activity, and maintain a cleaner Microsoft 365 environment.

The strongest results will come from identifying suitable folders carefully, testing policies with a pilot group, documenting the approved exclusions, and ensuring users understand that local-only content is outside the normal OneDrive cloud backup experience.

Learn More from Microsoft

For detailed configuration guidance and platform-specific policy steps, review Microsoft’s official OneDrive documentation below.

Migrate Everything to Microsoft 365

Exchange Online SharePoint Online OneDrive For Business Microsoft Teams Microsoft Planner Viva Engage (Yammer) Microsoft Bookings Microsoft Forms Power Automate Microsoft Power BI Exchange Online SharePoint Online OneDrive For Business Microsoft Teams Microsoft Planner Viva Engage (Yammer) Microsoft Bookings Microsoft Forms Power Automate Microsoft Power BI
  • No Data Loss
  • Zero Downtime
  • ISO-Certified Protection

Start your free 15-days trial today !


4.5 out of 5

Bot Logo

Apps4.Pro Bot

Hey!👋 Ready to make your Microsoft 365 migration journey easier? Tell me what you’re looking.

What gets migrated?
I have a sales question
I'm here for tech support
Learn about Apps4.Pro