Create a New Sub Site in SharePoint using PowerShell


How to create a sub site using Power Shell scripts in SharePoint 2010? To add a new subsite use the New-SPWeb cmdlet New-SPWeb –url <new site url> -name <new site name> -template <template name> Additional cmdlet which can be used: AddToTopNav, UniquePermissions, UseParentTopNav Sample Script to create new sub site in SharePoint using PowerShell New-SPWebContinue reading “Create a New Sub Site in SharePoint using PowerShell”

Create a New Site Collection in SharePoint 2010 using PowerShell


How to create a top level site collection in SharePoint using PowerShell? To add new site collection use the following cmdlets New-SPSite –url <URL> -name <site collection name> -owneralias <site collection admin> -template <template name> Sample PowerShell to create new site collection in SharePoint 2010 New-SPSite –url http://virtualizesharepoint -name Home -owneralias vSharePoint\SpAdmin -template STS#0 IfContinue reading “Create a New Site Collection in SharePoint 2010 using PowerShell”

Site template names and ID’s in SharePoint 2010


How to find SharePoint 2010 site templates names and ID’s using PowerShell? You can find site templates name and ID’s by running Get-SPWebTemplate | Sort-Object "Name" List of SharePoint 2010 Site Templates RV#0 RV#0 RV#1 RV#1 RV#3 RV#3 RV#4 RV#4 RV#5 RV#5 RV#6 RV#6 0 0 nterSite#0 nterSite#0 KINTERNET#0 KINTERNET#0 KINTERNET#1 KINTERNET#1 KINTERNET#2 KINTERNET#2 KINTERNETCONT.Continue reading “Site template names and ID’s in SharePoint 2010”

Create a New Web Application in SharePoint 2010 using PowerShell


To add new web application in SharePoint 2010 with PowerShell using New-SPWebApplication New-SPWebApplication –applicationpool <Application pool name> -name <New App Name> -applicationpoolaccount <service account> -port <Port Number> Sample Command Line to create new Web Application in SharePoint 2010 using PowerShell New-SPWebApplication –applicationpool SharePoint-80 -name SharePoint-80  –applicationpoolaccount vSharePoint\SPAdmin -port 80