Posts

Showing posts with the label webapp

SharePoint 2013 Base Types , List Template & Definitions Id, CT id

Image
list of the IDs of the most common Base Types, List Definitions and Content Types. Especially useful if you’re writing CAML definitions of Lists, List Instances, or Content Types. Here are the lists I’ve gleaned from MSDN.
Base Types These Base Types come from the SPBaseType enumeration. Base TypeIDCustom List0Document Library1Not used2Obsolete. Use 0 for discussion boards.3Surveys4Issues List5
List Definitions These List Definitions come from the SPListTemplateType enumeration.

Set custom level permission SharePoint PowerShell

Image
Hello,


Some time we need to apply a script on all the web application, today we can set the permission level for a specific group.

for the base permission you can use:
ViewListItems
AddListItems
EditListItems
DeleteListItems
ApproveItems
OpenItems
ViewVersions
DeleteVersions
CancelCheckout
ManagePersonalViews
ManageLists
ViewFormPages
Open
ViewPages
AddAndCustomizePages
ApplyThemeAndBorder
ApplyStyleSheets
ViewUsageData
ManageSubwebs
CreateGroups
ManagePermissions
BrowseDirectories
BrowseUserInfo
AddDelPrivateWebParts
UpdatePersonalWebParts
ManageWeb
UseClientIntegration
UseRemoteAPIs
ManageAlerts
CreateAlerts
EditMyUserInfo
EnumeratePermissions
CreateSSCSite

below the script :


$sites = get-spsite -Limit ALL –webapplication [webapp url]
ForEach ($spSite in $Sites)       
{        

$spWeb = $spSite.RootWeb

# Enter the Name of the Permission Level to Change
if ($PermissionLevel=$spWeb.RoleDefinitions["custom deinifition"])
{
Write-Host "working with : " $spSite -ForegroundColor Green
$bps = $PermissionLevel.…