Showing posts with label Create site collections. Show all posts
Showing posts with label Create site collections. Show all posts

15 May, 2013

Create Site Collections, Subsites, Custom List by using PowerShell- SharePoint 2010


Creating of subsites, site collections, custom lists, and document libraries can be easily created by using GUI (i.e. Graphical User Interface) – very easy-correct? But let me tell you guys that all this activities are easier if you do it by using PowerShell. That’s why I am sharing the same so that you can use the following things in day to day activities.



What we are going to check in this article?
-Creation of site collections
-Creation of subsites
-Creation of custom list’s

HOW TO CREATE A SUBSITE IN SHAREPOINT 2010 BY USING POWERSHELL?

New-SPWeb –url<new site url> -name <new site name> -template <template name>

SUBSITE CREATION ALONG WITH SOME ADDITIONAL PARAMETERS:

New-SPWeb –url http://sharepoint2010/sites/MOSS2010/SUB2010 -name "All about SUBSITES" -template STS#0 –AddToTopNav –UniquePermissions –UseParentTopNav

HOW TO CREATE SITE COLLECTION IN SHAREPOINT 2010 USING POWERSHELL?

$siteURL = “http://sharepoint2010/sites/MOSS2010;

$owner = “moss2010/SPAdministrator1”

$secondOwner = “moss2010/SPAdministrator2”

$template = “STS#0″

$description = “PowerShell created Site Collection”

New-SPSite $siteURL -OwnerAlias $owner -SecondaryOwnerAlias $secondOwner -name “PowerShell for SharePoint” -Template $template -Description $description

HOW TO CREATE A CUSTOM LIST IN SHAREPOINT 2010 BY USING POWERSHELL?

$SPAssignment = Start-SPAssignment

$SPWeb = Get-SPWeb http://siteURL -AssignmentCollection $spAssignment

$SPWeb.ListTemplates | Select Name, Description

$SPTemplate = $SPWeb.ListTemplates["Custom List"]

$SPWeb.Lists.Add("List Title","Description",$SPTemplate)

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you.

10 January, 2012

Delete a site collection

1-Select the site collection you want to delete from the drop-down menu on the Delete Site Collection page

2-After selecting Change Site Collection from the drop-down menu, you will see a list of site collections displayed for the Web application that you have most recently accessed.

3-To display a list of site collections for a different Web application, use the Web Application drop-down menu located at the upper-right of the page

Note: When you delete a site collection, all the content is deleted within it, including subsites, lists, and libraries. Therefore, you should perform a backup of the content database containing the site collection or export the site collection first

4-After clicking OK on the Select Site Collection page, you will see the Delete Site Collection page displayed again with the entire path of the site collection shown along with a Delete button.

5-Click Delete and then click OK on the confirmation dialog box to delete the selected site collection.

If you have any queries/questions regarding the above mentioned information then please let me know, Thank you

Create site collections

You can create new top-level site collections when you create your Web application or any time later using the Create Site Collections option in Application Management. You can create a top-level site collection using either the root URL of an unextended Web application or a managed path such as /sites or any other wildcard inclusion path you have created.When creating a new site collection, you will provide the following information.
  • Title and description
  • Website address using either the root of the Web application or a URL path
  • A site template that will be used to create the new site collection
  • A site collection administrator and a secondary administrator if required
  • A quota limit template if required
Make sure  to choose the correct Web application before creating the site collection so the collection is available in the correct Web application.

If you have any queries regarding the above mentioned information then please let me know, Thank you