Provision sub site using webtemplate in office 365
using Powershell + CSOM



Posted on September 6th, 2014

In this post you will learn how to provision sub site using webtemplate in office 365 using Powershell + CSOM.

For this one, first you need to get list of webtemplates available within site collection and then apply your webtemplate later while creating the sub sites.

If you are developing webtemplate for first time, check this video on how to develop webtemplates in SharePoint 2013 online.

Prerequisites:

Below are the list of dlls we need for execution of script.

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll

Powershell script:

Step 1: Get list of available webtemplates:

The below script helps to identify list of webtemplates available within the site collection.

From the output of the above script you have to identify the name of your webtemplate. See the below screen.

Step 2: Provision subsite using webtemplate:

Once you have webtemplate details, you can apply that to create a subsite.

See below script for provisioning sub site using webtemplate.

Conclusion:

In this post you have learned how to provision sub site using webtemplate in office 365 using Powershell + CSOM.


› Provision sub site using webtemplate in office 365 using Powershell + CSOM



Join 6,500 subscribers and receive instant access to

Devendra's Library of Resources for SharePoint Developers


About Author

Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and  SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.