How to Delete a Permission Level in SharePoint using PowerShell?
Requirement: PowerShell to remove a permission level in SharePoint
How to remove a permission level in SharePoint?
To delete a permission level in SharePoint, follow these steps:
SharePoint: PowerShell script to delete permission level
How to remove a permission level in SharePoint?
To delete a permission level in SharePoint, follow these steps:
- Login to your SharePoint site as Farm/Site collection administrator.
- Navigate to Site Settings >> Site Permissions
- Click on "Permission Level" button from the ribbon.
- Select the permission level to remove and click on "Delete Selected Permission Levels" link.
- Confirm the prompt to delete permission level.
SharePoint: PowerShell script to delete permission level
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration parameters $WebURL="https://portal.crescent.com/sites/Sales/" $PermissionLevelName="Contribute without Delete" #Get the Web $Web = Get-SPWeb $WebURL if($Web.RoleDefinitions[$PermissionLevelName] -ne $null) { $Web.RoleDefinitions.Delete($PermissionLevelName) write-host "Permission level Deleted successfully!" -f Green } else { write-host "Permission level Not Found!" -f Red }
Do not delete any out of the box Permission level! E.g. "Contribute", "Full Control", etc
Could we Hide the permission level instead of delete it?
ReplyDeleteNo! Hidden property is read-only.
Delete