{"id":979,"date":"2018-05-23T09:22:17","date_gmt":"2018-05-23T03:52:17","guid":{"rendered":"https:\/\/blog.binarybits.net\/?p=979"},"modified":"2018-05-23T09:22:17","modified_gmt":"2018-05-23T03:52:17","slug":"disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint","status":"publish","type":"post","link":"https:\/\/blog.binarybits.net\/disable-allow-items-from-this-site-to-be-downloaded-to-offline-clients-in-sharepoint\/","title":{"rendered":"Disable ‘Allow items from this site to be downloaded to offline clients’ in SharePoint"},"content":{"rendered":"
Sometime we need to disable the “Sync” button in SharePoint document libraries and that can be done by the following methods.<\/p>\n
Traditional Way:<\/strong><\/p>\n Site Settings -> Search: Search and offline availability -> Set ‘Allow items from this site to be downloaded to offline clients?’ to “No”<\/p><\/blockquote>\n Programmatic<\/b>\u00a0way using PnP Powershell:<\/strong><\/p>\n Sometime we need to disable the “Sync” button in SharePoint document libraries and that can be done by the following methods. Traditional Way: Site Settings -> Search: Search and offline availability -> Set ‘Allow items from this site to be downloaded to offline clients?’ to “No” Programmatic\u00a0way using PnP Powershell: try { $web = Get-PnPWeb […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[62],"tags":[270,231],"yoast_head":"\ntry {\r\n $web = Get-PnPWeb -Includes ExcludeFromOfflineClient\r\n Write-Host \"Setting options to disable 'Allow items from this site to be downloaded to offline clients'...\"\r\n $web.ExcludeFromOfflineClient = $true \r\n $web.Update()\r\n Invoke-PnPQuery\r\n Write-Host \"Completed.\"\r\n}\r\ncatch {\r\n $ErrorMessage = $_.Exception.Message\r\n Write-Host \"Error disabling offline clients. $ErrorMessage\"\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"