Monday 26 September 2016

PowerShell to disable and enable the Sync option in SharePoint

This post is related to Power-shell cmd to disable and enable the Sync option in SharePoint

So lets get started :)

Our Sync option is working fine.






If you are using window Power-Shell then you have to add Power-Shell snap-ins for  SharePoint.

I ran these cmds on SharePoint management Shell
 
To disbale the Sync option  (ExcludeFromOfflineClient=1)

Get-SPSite -limit all | get-SPWeb -limit all | Foreach { $_.ExcludeFromOfflineClient=1;
$_.Update()}


After successfully completion of commands our sync option has been disable.


Now, we have to enable the Sync option again.
To enable the Sync option  (ExcludeFromOfflineClient=0)

Get-SPSite -limit all | get-SPWeb -limit all | Foreach { $_.ExcludeFromOfflineClient=0;
$_.Update()}


After successfully completion of commands our sync option is enable again.



Happy SharePointing :)

2 comments:

  1. Is there a corresponding PS command for SharePoint Online?

    ReplyDelete
  2. Using CSOM Object model. Have a look at this: https://gallery.technet.microsoft.com/scriptcenter/How-to-enabledisable-sync-8ad53996

    ReplyDelete