SharePoint online create sub site using PowerShell

Creating a subsite is quite an easy job from a SharePoint site, and if you are going to create a SharePoint site using Powershell then it will be time taking option and require more technical skills.

I would not suggest you to use Powershell script for creating one to two sub sites but if you are doing consultancy and have to create site information architecture which can involve number of sub sites then it would be a time taking job if you are going to create them through SharePoint environment.

Here I am sharing a PowerShell script which can be used for creation of a SharePoint online, and you can use it in scenarios where you have to create an information architecture which involve multiple subsites at different levels. Customize the script as per your requirement and you can create all sites with minimum effort and this script can be used for multiple assignments.

In above script I have created a function createNewSite which take site url as parameter where it will create the site. Below is the function call:

Note: You need full control on the site for creation of a new sub site.

The following two tabs change content below.
Adnan Amin
Adnan is two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply