SharePoint Site Script To Provision Calendar List And Add Attendees Column
- How to create custom content type
- How to add site column to custom content type
- How to create Calendar list.
- How to add custom content type to Calendar list(this can be added to any list)
- How to remove default Event content type from Calendar list.
- First thing you would need is SharePoint Online management shell. In case you don’t have installed, use this link to download.
- You would need SharePoint Admin credentials to add Site design to your tenant.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json",
"actions": [
{
"verb": "createContentType",
"name": "Custom Event",
"description": "Custom event content type",
"parentName": "Event",
"hidden": false,
"subactions":
[
{
"verb": "addSiteColumn",
"internalName": "ParticipantsPicker",
"addToDefaultView": true
}
]
},
{
"verb": "createSPList",
"listName": "My Calendar",
"templateType": 106,
"subactions": [
{
"verb": "SetDescription",
"description": "Meetings calendar list for project management site"
},
{
"verb": "addContentType",
"name": "Custom Event"
},
{
"verb": "removeContentType",
"name": "Event"
}
]
}
],
"version": 1
}
The idea here is to add Attendees site column to calendar list and add this to default content type. As we cannot directly add site columns to existing content type, we will create a custom content type with base as ‘Event’ content type and then remove ‘Event’ content type from Calendar list.
$adminUPN="[email protected]"
$orgName="warnerbrothers"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-SPOService -Url https://warnerbrothers-admin.sharepoint.com -Credential $userCredential
This will ask you password in window, once connected we would be able to run any powershell commands.
Get-Content 'D:\Projects\samples\SiteScriptDemo.json' `
-Raw | `
Add-SPOSiteScript `
-Title "Calendar provision Site script"
Once we run this, it will give below output, we need to copy site script id which will be used later.

- Add-SPOSiteDesign `
- -Title “Calendar Site design” `
- -WebTemplate “64” `
- -SiteScripts “42d2d3c4-f51b-47c2-bda3-9ef2qcc16ehd” `
- -Description “Creates calendar list and add Attendees column”



You can also choose to apply site design to existing site collection. Go to exisiting site collection, click on Gear icon on header, click on Site design.




- How to create custom content type
- How to add site column to custom content type
- How to create Calendar list.
- How to add custom content type to Calendar list(this can be added to any list)
- How to remove default Event content type from Calendar list.
Note – This article was originally published at this link.

