Forum Discussion
Can we hide the Sync on all the current sites and future sites using UI or using PowerShell
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
john john yup. One liner using set-spotenant
https://learn.microsoft.com/en-us/sharepoint/sharepoint-sync
- john johnSteel Contributor
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?
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.
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.
- john johnSteel Contributor
ganeshsanapdid you try this command
Set-PnPTenant -DisableListSync $true
as i will get this error
Set-PnPTenant: Field or property "DisableListSync" does not exist.
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.