Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create Site Collections And Sites In SharePoint Using PowerShell - Part One
WhatsApp
Ketak Bhalsing
8y
9.4k
0
0
100
Article
Introduction
Document Objective
The purpose of this document is to provide instructions on using this PowerShell script to create site collections and sites in sharepoint using different web templates.
Audience
This document is targeted to developers and architects responsible for creating site collections and sites using multiple combinations with different web templates. Please note that root site collection must be present with web application URL. The code can be modified and extended as per requirements.
Creating Site Collection and then sub site within same site collection
Procedure
Go to Start > Open
SharePoint
2013 Management Shell.
Run as administrator.
Run the script.
Enter Web application url. Press Enter.
It will validate the web application url. If root site collection is present at web application url, it will ask if user wants to create site collection or sub site.
Enter 1. It will ask the site collection details. Enter Site Title, Site description and Site Url (must be a valid URL) URL is prepopulated in ‘e.g’ part. User can use this URL.
After entering all details, it will ask for web template category choice.
Enter 1. Then, it will ask for web template for this particular web template category.
Enter 1 for Team Site.
Enter Primary administrator and Secondary Administrator(optional) details.Press Enter.
Site Provisioning process will take place.
After Site Collection gets provisioned, it will ask if user wants sub site to be created under newly created site collection.
Enter “y”. It will ask for Sub Site details. Enter these details.
Site Provisioning process will take place.
After successfully provisioning the site, it will ask if another sub site to be created under same site collection.
Enter “y” if user wants another sub site to be created under same site collection. Otherwise enter “n”.
Then it will ask if another site collection under same web application to be created. Enter “y” if user wants another site collection to be created under same web application. Otherwise enter “n”.
Then it will ask if another Site collection or sub site to be created. Enter “y”.
User can follow steps 5 to 13 to create multiple site collections and sub sites with different web templates.
PowerShell
SharePoint
Site Collections
Up Next
Ebook Download
View all
SharePoint Framework (SPFx) A Developers Guide
Read by 11.1k people
Download Now!
Learn
View all
Membership not found