Everything began from nothing.

Showing posts with label webapp. Show all posts
Showing posts with label webapp. Show all posts

Monday, 20 February 2017

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



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 TypeID
Custom List0
Document Library1
Not used2
Obsolete. Use 0 for discussion boards.3
Surveys4
Issues List5

List Definitions

These List Definitions come from the SPListTemplateType enumeration.
Enumeration NameDescriptionID
InvalidTypeNot used-1
NoListTemplateunspecified list type0
GenericListCustom list100
DocumentLibraryDocument library101
SurveySurvey102
LinksLinks103
AnnouncementsAnnouncements104
ContactsContacts105
EventsCalendar106
TasksTasks107
DiscussionBoardDiscussion board108
PictureLibraryPicture library109
DataSourcesData sources for a site110
WebTemplateCatalogSite template gallery111
UserInformationUser Information112
WebPartCatalogWeb Part gallery113
ListTemplateCatalogList Template gallery114
XMLFormXML Form library115
MasterPageCatalogMaster Page gallery116
NoCodeWorkflowsNo Code Workflows117
WorkflowProcessCustom Workflow Process118
WebPageLibraryWiki Page Library119
CustomGridCustom grid for a list120
SolutionCatalogSolutions121
NoCodePublicNo Code Public Workflow122
ThemeCatalogThemes123
DataConnectionLibraryData connection library for sharing information about external data connections130
WorkflowHistoryWorkflow History140
GanttTasksProject Tasks150
MeetingsMeeting Series (Meeting)200
AgendaAgenda (Meeting)201
MeetingUserAttendees (Meeting)202
DecisionDecisions (Meeting)204
MeetingObjectiveObjectives (Meeting)207
TextBoxText Box (Meeting)210
ThingsToBringThings To Bring (Meeting)211
HomePageLibraryWorkspace Pages (Meeting)212
PostsPosts (Blog)301
CommentsComments (Blog)302
CategoriesCategories (Blog)303
FacilityFacility402
WhereaboutsWhereabouts403
CallTrackCall Track404
CirculationCirculation405
TimecardTimecard420
HolidaysHolidays421
IMEDicIME (Input Method Editor) Dictionary499
ExternalListExternal600
IssueTrackingIssue tracking1100
AdminTasksAdministrator Tasks1200
HealthRulesHealth Rules1220
HealthReportsHealth Reports1221

Content Types

These content types come from the Content Type ID list.
Content TypeID
System0x
Item0x01
Document0x0101
Event0x0102
Issue0x0103
Announcement0x0104
Link0x0105
Contact0x0106
Message0x0107
Task0x0108
Workflow History0x0109
Post0x0110
Comment0x0111
East Asia Contact0x0116
Folder0x0120

Tuesday, 17 January 2017

Set custom level permission SharePoint PowerShell

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.BasePermissions

Write-Host "saving base permission ..."
Write-Host $bps -ForegroundColor Cyan

# Enter all the permissions that Permission Level should have enabled

$PermissionLevel.BasePermissions="ManageSubwebs","$bps","ApplyThemeAndBorder,ApplyStyleSheets,ManageWeb"

Write-Host "Applying new base permission on ..."
Write-Host  $PermissionLevel.BasePermissions -ForegroundColor Magenta

$PermissionLevel.Update()
$spweb.Dispose()
$spsite.Dispose()
else
{
Write-Host "no custom definition  in " $spSite -red

Thanks.