Aug 24 2023 03:00 PM
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
but my question is if there is a way to remove this globally on all the current sites and all future site? Thanks
Aug 24 2023 10:35 PM
@john john yup. One liner using set-spotenant
https://learn.microsoft.com/en-us/sharepoint/sharepoint-sync
Aug 24 2023 11:26 PM
@john john You can also 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
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 25 2023 03:24 AM - edited Aug 25 2023 03:25 AM
@ChrisWebbTechi read this link before, but running this command
Set-SPOTenant -HideSyncButtonOnTeamSite $true
will remove the sync button which will block new syncs from being started but doesn't affect existing syncs.
While i need to stop existing syncs as well. any advice?
Aug 25 2023 03:26 AM
@john john I don't think you will be able to remove/stop the existing syncs. Users will have to do it from there side.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Aug 25 2023 03:27 AM - edited Aug 25 2023 03:30 AM
@ganeshsanapdid 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 06:27 AM
@john john I highly recommend from turning sync off in that manner. You are asking for trouble. You’ll end up with duplicated data on everyone’s machines with local copies being saved to from recent lists etc.
this was one of the biggest problems with sync verses using the newer link to OneDrive feature was removing sync left files behind in any file that had an offline copy.