I followed the steps below to disable the "share" and "follow" buttons in Sharepoint:

Disable Share Button

  1. Settings > Site Settings > User and Permission : Site Permission

  2. Click Access request Settings > Uncheck allow accesst request

Disable Follow button

  1. Settings > Site Settings > Site Actions : Manage Site Features

  2. Deactivate feature : Following Content

Is there also a way to do this with a PowerShell script?

2 Answers 2


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}

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})
write-host $web.Title, $web.URL updated}}

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

  • Can these share buttons be hidden only in 1 Document Library? I thought of applying CSS in this particular page not sure if thats correct approach.
    – Asad Refai
    Commented Dec 9, 2016 at 10:40
  • 1
    @AsadRefai AFAIK They can be hidden by CSS or removed by JavaScript. I think it's an OK approach instead of disabling for the whole tenant.
    – Benny Skogberg
    Commented Dec 9, 2016 at 10:52
  • i need to disables the “Allow access request” in Shrarepoint 2019 , unfortunately this script dsenot work, any idea please
    – Imen Turki
    Commented Jan 11, 2021 at 15:46
  • 1
    @ImenTurki Sorry, I have no clue
    – Benny Skogberg
    Commented Jan 13, 2021 at 9:57

Disable Below Feature :

Disable-SPFeature -Identity "FollowingContent" -Url http:/sp/site/web
  • Please provide more information to your answer. Commented Jan 8, 2016 at 8:14
  • It's a Powerless command to write in share point management shell
    – Dipen Shah
    Commented Jan 8, 2016 at 8:22
  • You mean Powerful or PowerShell? :) Commented Jan 12, 2016 at 10:45
  • Power shall command Using sharepoint management shall.
    – Dipen Shah
    Commented Jan 12, 2016 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.