I use SP 2013 on-premises and I am having a requirement to hide the Site Contents command/link.Is there any way I can achieve this with the help of PowerShell? I tried with the SPSecurityTrimmedControl using SP D 2013, but it has a drawback,that we won't be able to see the context menu for a item within the document library.So that option is ruled out.

  • @SaMoIPP p What links you would want to hide? Any in particular like Add page
    – Asad Refai
    Jul 1, 2015 at 8:10
  • Benny,this is not a duplicate as I am looking for PowerShell solution.Please remove the duplicate in the question, if you have rights.
    – samolpp2
    Jul 1, 2015 at 10:25
  • Asad,Thanks for your reply.I need to hide the Site Contents link/command.Can i achieve through PowerShell
    – samolpp2
    Jul 1, 2015 at 10:26
  • why not use CSS? Jul 1, 2015 at 13:50

1 Answer 1


Assuming you are talking about the Quick launch menu try something like this:

$web = Get-SPWeb http://SharePoint/etc
$quicklaunch = $web.Navigation.QuickLaunch
$sc = $quicklaunch | where {$_.Title -eq 'Site Contents'}
  • Its not the quick launch.On the top right hand corner there exists the wheel symbol and on click of that the Site Contents site actions menu items would be populated.As part of my requirement , I need to hide the Site Contents menu item using PowerShell.
    – samolpp2
    Jul 1, 2015 at 11:37
  • If I explain more clearly,for a particular SP group say ABC Group I want to hide this site contents page. ie, I should not show this site contents link or /15/layouts/viewlsts.aspx page for this SPGroup.
    – samolpp2
    Jul 1, 2015 at 11:43
  • I'm afraid you will need to use javascript / jquery. I don't think there is any way to do that in PS.
    – Bunzab
    Jul 1, 2015 at 11:58

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.