If I as a client tell u, I need a custom permission level within minutes what will You Do? Involve more resources to set up custom levels. Here it is a quick way.

First see what kind of permissions you want that custom level to have.

Choose from the following:

Now here comes the script,

Add the permissions you want to the script.

Powershell Script:

  1. $site=Get-SPSite "My Site Name Here"
  2. $web=$site.RootWeb;
  3. $customPermissionLevel=New-Object Microsoft.SharePoint.SPRoleDefinition
  4. $customPermissionLevel.Name="Custom Permission in SharePoint"
  5. $customPermissionLevel.Description="Description: This is a Testing"
  6. $customPermissionLevel.BasePermissions="EmptyMask,
  7. ViewListItems,
  8. AddListItems,
  9. EditListItems,
  10. DeleteListItems,
  11. ApproveItems,
  12. OpenItems,
  13. ViewVersions,
  14. DeleteVersions,
  15. CancelCheckout,
  16. ManagePersonalViews,
  17. ManageLists,
  18. ViewFormPages,
Open,
  1. ViewPages,
  2. AddAndCustomizePages,
  3. ApplyThemeAndBorder,
  4. ApplyStyleSheets,
  5. ViewUsageData,
  6. CreateSSCSite,
  7. ManageSubwebs,
  8. CreateGroups,
  9. ManagePermissions,
  10. BrowseDirectories,
  11. BrowseUserInfo,
  12. AddDelPrivateWebParts,
  13. UpdatePersonalWebParts,
  14. ManageWeb,
  15. UseClientIntegration,
  16. UseRemoteAPIs,
  17. ManageAlerts,
  18. CreateAlerts,
  19. EditMyUserInfo,
  20. EnumeratePermissions,
  21. FullMask"
  22. $web.RoleDefinitions.Add($customPermissionLevel);
  23. $web.Dispose()
  24. $site.Dispose()

custom label

On clicking on the custom level you will see the below permissions added to the level.

permissions added to the level

select option

Quick isn’t it?

Keep Learning,

Cheers.