Friday, August 7, 2015

How to Delete a Custom Permission Level in SharePoint using PowerShell

PowerShell to remove a permission level in SharePoint

SharePoint: PowerShell script to delete permission level

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue 

#Configuration parameters
$PermissionLevelName="Contribute without Delete"

#Get the Web
$Web = Get-SPWeb $WebURL

if($Web.RoleDefinitions[$PermissionLevelName] -ne $null)
 write-host "Permission level Deleted successfully!" -f Green
 write-host "Permission level Not Found!" -f Red
Do not delete any out of the box Permission level! E.g. "Contribute", "Full Control", etc

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...