SPSite Site Collection Operations in SharePoint 2013

Summary : SPSite Site Collection Operations in SharePoint 2013,Creates a new Site Collection,Move Site Collections from one Content database to another,Use the Copy-SPSite cmdlet to make a Copy of a site collection

SPSite has few new parameters in SharePoint 2013 to make Site Collection Operations easier.Here are the examples of how to use these operations.

Because We’re So Good, Our Content gets Copied very Often.If you are not reading this on LearningSharePoint.com, please read the Original article Here for details, comments and updates on this post.



New-SPSite - Creates a new site collection at the specified URL.The New-SPSite cmdlet creates a new site collection with the URL and owner that the Url and OwnerAlias parameters. specify This cmdlet can create site collections in either the SharePoint Server 2010 mode which uses the legacy 2010 versions of templates and features, or can be created in SharePoint Server 2013 mode which uses the new versions of templates and features.

New-SPSite {SiteCollectionURL} -OwnerAlias “DOMAIN\admin” –Language 1033

Create a Host-name Site Collection(new) - New-SPSite cmdlet allows to Create a Host-name Site Collections adding a using the HostHeaderWebApplication parameter that identifies the Web Application where the site collection is being Created.

Example –
New-SPSite {SiteCollectionURL} -HostHeaderWebApplication {WebAppURL} -Name “TopLevelSite” -Description “This is top level Site colletcion” -OwnerAlias “DOMAIN\admin” -language 1033 -Template “STS#0″

Move-SPSite - Moves site collections from one content database to another.The Move-SPSite cmdlet moves the data in the specified site collection from its current content database to the content database specified by the DestinationDatabase parameter. A no-access lock is applied to the site collection to prevent users from altering data within the site collection while the move is taking place.
Example –

Move-SPSite {SiteCollectionURL} -DestinationDatabase {DatabaseName}

Copy-SPSite (new)- Use the Copy-SPSite cmdlet to make a copy of a site collection from one Source content database to a specified destination content database.The copy of the site collection has a new URL and a new SiteID.This will be very useful when renaming a SiteCollection.

Copy-SPSite {SourceSiteCollectionURL} -DestinationDatabase {SourceDatabaseName} -TargetUrl {SourceSiteCollectionURL}

Test-SPSite (new)- The Test-SPSite cmdlet runs one or all site collection health checks on the site collection and its contents.This cmdlet reports the rules which were run and provides a summary of the results.

Example –
Test-SPSite {SiteCollectionURL}

Original article : Here


Trackbacks

  1. […] Farm Administrators Powershell Commands like SPSite has been enhanced to perform better Site Collection Operations.Apart from new cmdlets a New feature Shredded Storage […]

Speak Your Mind

*