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: Special characters in REST query filter statement
    A few days back Sandeep mailed me about issues in SharePoint 2010 Autocomplete Lookup Field . The Autocomplete field was not working prop...
  • SharePoint Hide a list field based on user group
    A field in a SharePoint list form like NewForm.aspx or EditForm.aspx can be easily hidden by using the following Jquery statements. Assume ...
  • 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...
  • PowerShell: Calling static and instance methods from PowerShell
    Powershell can be used to call both static and instance methods present in your classes. Suppose the dll is present in the GAC, the first t...
  • 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 2013: Recurring Calendar Events
    I have been working on aggregating calendar events from different calendar lists present in different sub sites of a site collection and su...
  • SharePoint: Export Version History of SharePoint 2010 List items
    Project Description Export version history can be used to export the version history of SharePoint 2010 List items to Microsoft Excel. It...
  • 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 Content By Query Webpart PageQueryString and PageFieldValue
    Content Query webpart series: Part 1:  Configuring SharePoint 2010 CQWP Part 2: CQWP PageQueryString and PageFieldValue Part 3:  CQWP XS...
  • SharePoint 2013: MissingSiteDefinition Test-SPContentDatabase
    I needed to migrate a SharePoint 2010 site to SharePoint 2013. So I took the backup of the content database and restored it on SharePoint 2...

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