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,
- Change SharePoint Online List Experience to New Experience from Classic
- Cannot load PowerApps form in SharePoint Online due to repeated authentication
- Create SharePoint list from Excel spreadsheet and import table
- [Solved] SharePoint Search Internal server error exception
- [Fix] SharePoint: This embed code doesnt seem to work. We only support iframe based embeds
- How to extend retiring SharePoint 2010 Workflows and continue with Office 365
- SharePoint Online: Editing session has ended Message
- SharePoint error cannot connect to the configuration database
- That did'nt work, Issue type User not in directory - SharePoint external access error
- How to embed web page in SharePoint
- SharePoint - The URL is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web.
- SharePoint error 2130575251 - The security validation for this page is invalid and might be corrupted
- Microsoft 365: How to Turn Off Delve in SharePoint Online for All Users
- SharePoint Server 2016 error Microsoft Office Online Server 2016 cant be installed on the same machine as a Microsoft SharePoint Server product
- JSON column formatting to preview SharePoint Online file on mouse hover
- How to show Videos on SharePoint Page
- How to get SharePoint Online user details from person or group column using REST API
- How to retrieve all SharePoint Online List Items using Rest API
- How to wrap column text in SharePoint Online Modern List Grid View using JSON formatting
- Recommended size and resolution for SharePoint Online Site logo
- SharePoint List redirect user after submitting form NewForm.aspx
- Add Custom External Link to SharePoint Site Navigation
- Drag drop files here option missing for SharePoint document library
- Can Microsoft SharePoint Lists be synced and accessed offline without internet?
- SharePoint - Use Today's Date Time in list view filter and calculated column
More Posts:
- Python: Pandas Rename Columns with List Example - Python
- How to get file path of a file using Java Code? - Java
- Quick Fix: How to Force Restart Your iPhone - iOS
- Python: Pandas Merge With Examples - Python
- Java 8 Predicate Functional Interface isEqual() Method Example - Java
- Enable Spellcheck in eclipse workspace - Eclipse
- PHP Fatal error : Call to a member function bind_param() on a non-object - PHP
- Fix: pip install mysqlclient error: subprocess-exited-with-error - MySQL