0

I know that we can hide the Sync button for a document library or for all the document libraries inside a site as mentioned in this link https://www.sharepointdiary.com/2017/08/disable-sync-button-in-sharepoint-online.html

enter image description here

but my question is if there is a way to remove this globally on all the current sites and all future site?

2
  • 1
    There are blog posts with full Powershell scripts to disable sync for all sites in a site collection. Loop through all sites in the tenant.
    – teylyn
    Aug 24, 2023 at 22:19
  • @teylyn yes i can loop and set this for each site,, but this will not disable it on future sites unless i run the script again and again, that why i am asking if i can set this globally Aug 24, 2023 at 22:20

1 Answer 1

1

Try using Set-PnPTenant in PnP PowerShell for disabling sync option for all lists and all sites in the SharePoint tenant:

Connect-PnPOnline -Url "https://contoso-admin.sharepoint.com" -Interactive
Set-PnPTenant -DisableListSync $true

OR Try using Set-SPOTenant in SharePoint Online PowerShell:

Connect-SPOService -Url https://contoso-admin.sharepoint.com
Set-SPOTenant -HideSyncButtonOnTeamSite $true

Reference: Sync in SharePoint and OneDrive

3
  • did you try this command Set-PnPTenant -DisableListSync $true as i will get this error Set-PnPTenant: Field or property "DisableListSync" does not exist. Aug 25, 2023 at 10:43
  • also the second script will return this error Set-SPOTenant: The term 'Set-SPOTenant' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Aug 25, 2023 at 10:47
  • 1
    For using Set-SPOTenant, you have to run it from SharePoint Online Management Shell. Install the SharePoint Online Management Shell and run the commands from it: learn.microsoft.com/en-us/powershell/sharepoint/… Aug 25, 2023 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.