SharePoint Learnings

Home » Powershell » SharePoint 2010 » SharePoint: Delete SharePoint Site Permission Level using PowerShell

SharePoint: Delete SharePoint Site Permission Level using PowerShell

Nadeem Yousuf August 27, 2013 Powershell, SharePoint 2010
Consider a scenario where you need to delete a permission level from a SharePoint site using PowerShell. 
The following PowerShell code deletes Contribute Permission level from a site:

$web = Get-SPWeb -Identity http://sp2010:90
$PermissionLevel=$web.RoleDefinitions
$PermissionLevel.Delete("Contribute")

Share this

Share on FacebookTweet on TwitterPlus on Google+
« Prev Post
Next Post »

Search This Blog

profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts

Popular Posts

  • SharePoint: REST API Calls uisng C#
    The code example shows how to make SharePoint REST API GET calls in C# using HttpWebRequest. The sample code assumes that the SharePoint Li...
  • SharePoint CSOM : Create Lookup column with additional field
    This post shows how to create a lookup column with additional field using SharePoint C# Client side object model code. I have two lists, E...
  • SharePoint: Limit folder content types. Change New Button Order
    Scenario: A SharePoint document library or list containing various content types as seen in the screenshot below: All Content Types ...
  • SharePoint: CSOM break folder permissions
    Consider a scenario where you need to break permissions of a folder using client object model (CSOM) in SharePoint. The code below creates...
  • SharePoint: Get Publishing Pages from inside folders
    I had few folders in a pages library which contained pages inside them.  PublishingWeb . GetPublishingPages ()  only gets pages present in...
  • SharePoint: Get Files from folder using JavaScript client object model
    The example below uses  SP . CamlQuery ()  to get items by setting  set_folderServerRelativeUrl  .  <script type = "text/javascri...
  • SharePoint: HasRights and Edit Control Block
    I recently found a bug in one of my codeplex projects Export Version History . A user was able to see the Export Version History option in ...
  • SharePoint PowerShell: Get files in Library
    Get the Name and Url of the files inside a SharePoint Document library using PowerShell: Code Example 1: $web = Get - SPWeb "http:...
  • SharePoint: Change Page Layout through code
    The following example changes the layout of a page to ArticleLeft.aspx. using ( SPSite site = new SPSite ( "http://aissp2013...
  • SharePoint: Update XSLTListViewWebPart properties
    Consider a web part page having an XSLTListViewWebpart on it and the requirement is to update its properties using PowerShell. In this exam...

Copyright © 2018 SharePoint Learnings | Template By HAFID Notes | Distributed By Blogger Templates