Set Site Actions -> Navigation -> Show and Hide Ribbon -> Make "Show Ribbon" and "Hide Ribbon" commands available to No

How can we do the above programmatically?

1 Answer 1


Using PowerShell you can do this using

$spWeb = Get-SPWeb "http://sharepointSiteUrl"  
$spWeb.AllProperties["__DisplayShowHideRibbonActionId"] = $false.ToString() 


spWeb.AllProperties["__DisplayShowHideRibbonActionId"] = false.ToString(); 
  • Was looking for server side C# code, but I can convert it and try.. thanks Amal Commented Mar 30, 2015 at 15:42
  • @ArsalanAdamKhatri updated! Commented Mar 30, 2015 at 15:43

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.