PowerShell script to create SharePoint Site Collection
Make sure you open SharePoint Management Shell using 'Run as Administrator'.
Name : Create SharePoint Site Collection using PowerShell
$siteURL = "http://sharepointsite/sitecoll2"
$sitePrimaryOwner = "domain\username"
$siteSecondaryOwner = "domain\username"
$siteName = "Site Collection 2"
$siteTemplate = "STS#0"
$siteDescription = "This is a site created using PowerShell command"
New-SPSite -Url $siteURL -OwnerAlias $sitePrimaryOwner -SecondaryOwnerAlias $siteSecondaryOwner
-siteName $siteName -Template $siteTemplate -Description $siteDescription
Parameters/Attributes used in this command -
-Url - The URL of the site collection to be created
-OwnerAlias - The Primary owner for this site collection
-SecondaryOwnerAlias - The Secondary owner for this site collection
-siteName - The Name of the site collection to be created
-Template - The Template of the site collection to be created
-Description - The Description of the site collection to be created
List of default site templates can be found from Microsoft TechNet. Here is a list for SharePoint 2010 - http://social.technet.microsoft.com/wiki/contents/articles/20100.sharepoint-2010-default-site-templates.aspx
More Posts related to SharePoint,
- SharePoint error - An exception occurred when trying to issue security token: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms..
- PowerShell iterate and get all SharePoint sites and sub sites
- SharePoint Online: Editing session has ended Message
- How to Share Microsoft SharePoint Site with Users or Groups
- How to delete SharePoint Online List Item using REST API
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- How to disable SharePoint subsite creation option for owners
- SharePoint 2010 August 2015 Update KB3055049 - Duplicate Document ID issue bug fixed
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly.
- How to upload file programmatically to SharePoint Document Library using Server Object Model C# .Net
- Access URL for SharePoint Tenant Admin Center (Online Office 365)
- Error when deleting SharePoint Online folder or file
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- How to generate client id and secret to register SharePoint App with OAuth
- How to delete SharePoint List Item programmatically using C#.Net
- How to retrieve all SharePoint Online List Items using Rest API
- [Solved] SharePoint Search Internal server error exception
- Create SharePoint Site Collection using PowerShell New-SPSite
- Fix SharePoint PowerShell error - The term Get-SPweb is not recognized as the name of a cmdlet function script file or operable program
- How to enable anonymous public access for SharePoint Online site collection, file, folder without login ?
- SharePoint Server 2016 installation System Hardware requirements
- How to create SharePoint Online List Item using REST API
- Changed AD user display name showing old name in SharePoint
- Recommended size and resolution for SharePoint Online Site logo
- Microsoft 365: How to Turn Off Delve in SharePoint Online for All Users
More Posts:
- Python: Pandas Rename Columns with List Example - Python
- Use Google Chrome Canvas to create drawings - Chrome
- Jupyter Notebook: 404 : Not Found - You are requesting a page that does not exist! - Python
- Fix Error Code: 80090030 in Microsoft Outlook/Teams - Microsoft
- How to download and install Slack on Mac - MacOS
- How to Upload Video to YouTube from Android - Android
- Fix: Failed in attempting to update the source: winget - Windows
- Python: Fix command not found pip or pip3 on zsh shell - Python