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-SPWeb –url http://vsharepoint/HyperV -name "All about HyperV"
-template STS#0 –AddToTopNav –UniquePermissions –UseParentTopNav

Template Names: http://virtualizesharepoint.com/2012/01/03/site-template-names-and-ids-in-sharepoint-2010/

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s