Move a Site Collection to a Different Content Database

Scenario/Problem: You want to move a particular site collection to a different content database.

Solution: Use the Move-SPSite cmdlet.

The Move-SPSite cmdlet enables you to easily move a site collection from one content database to another. All that is needed to execute this cmdlet is the site collection identity and the destination database name. Listing 8.17 shows a sample command line.

Listing 8.17. Moving a Site Collection to a Different Content Database

Move-SPSite -Identity "http://sp2013/sites/sitecol"-DestinationDatabase "WSS_CONTENT_TEAMSITES"

You do not need to provide the originating database because no parameter exists for that anyway. The destination database must already ...

Get PowerShell™ for SharePoint® 2013 How-To now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.