Samstag, 25. Oktober 2014

Deactivate social feature MySite, Newsfeed, OneDrive, Sync, Share & Follow in SharePoint 2013

In several project I had the request to deactivate one or all of the following features. Poorly there is no consistent way to do it.

Sync button

To deactivate that feature we can use the SPList.ExcludeFromOfflineClient property. With this PowerShell Script we can set the value to 1 which deactivates the Synch function everywhere.

THX Sahil Malik for that script

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


MySite:

If we can start with a fresh system we can remove the permissions to create MySites. If already MySites are created we first must delete them. Only the MySites, not the MySite host!
Do not give the user the option to set up MySites will also remove the Newsfeed and the OneDrive link in the SharePoint top link bar.


Share

This script disables the “Allow access request” setting under Site Settings -> Site Permissions -> Allow access request for all Sites and SubSites und the configured URL

$Webapp = Get-SPWebApplication "http://MySharePointURL"
ForEach ($site in $webapp.Sites)
{ForEach ($web in $site.AllWebs | where {$_.RequestAccessEnabled -and $_.Permissions.Inherited -eq $false})
{$web.RequestAccessEmail=""
write-host $web.Title, $web.URL updated}}

The “Share” button and also the entries in the HoverPannels and context menus are still there but the user get the message that he did not have the right to share content or sites. Another option is to set the max allow documents, sites and users to follow to 0. We can do this in Manage Profile Service -> MySites settings section -> Manage Following http://technet.microsoft.com/en-us/library/jj219740(v=office.15).aspx


Follow

This script goes through the hierarchy and disables the Following Content feature in every WebSite. You get an error message for every site where the feature is not active or missing. This can be ignored

$w = Get-SPWeb http://MySharePointURL | ForEach{ $_.URL }
Get-SPFeature -Web $w |%{ Disable-SPFeature -Identity "FollowingContent" -URL $w -Confirm:$false}

Keine Kommentare:

Kommentar veröffentlichen