SharePoint Online: Enable / Disable Sync for all Sites

Sync options enables a site content to be available offline, users can sync documents using from a SharePoint Document Library using OneDrive sync client on their local drives to use them offline and can also add content and changes to it which will be uploaded when connected online.

There are requirements for some specific content where site administrators require to disable document syncing on some of the document libraries (check this this blog post to learn about enabling and disabling sync on a document library). And there could also be requirements where site administrator require to disable offline availability of all content from a site.

I will be sharing two different ways for achieving this job by enabling/disabling from site settings and PowerShell. PowerShell option would be very helpful if you trying to disable sync on multiple sites or for all sub sites under a site or site collection.

Enable / Disable Sync for a Site

Follow the below steps to enable / disable sync button for a document library

  • Got to site settings
  • Click on “Search and Offline availability option” listed under “Search
  • Select “Yes” or “No” option for “Offline Client Availability” (check screenshot at top)
  • Save changes

This will disable the sync option from all document libraries in the site, you verify that be visiting any of the document library under that site.

Enable / Disable Sync for a Site using PowerShell

I am sharing a PowerShell script which could be helpful enabling or disabling sync at the site level. The EnableDisableSiteSync function takes two parameters site url and action, if you need to run disable or enable all sub sites under the given URL then you can iterate through all sub sites and perform the required action.

The following two tabs change content below.
Adnan Amin
Adnan is two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply