Friday, April 24, 2015

MOVING A SITE COLLECTION BETWEEN CONTENT DATABASES (SHAREPOINT 2013 USING POWERSHELL)

I have created a new site collection within a SharePoint 2013 web application and want it to use a new content database.  After creating the new content database using the New-SPContentDatabase cmdlet I used the Move-SPSite cmdlet:
Move-SPSite <URL> –DestinationDatabase “<DatabaseName>”
Move-SPSite
Once complete I ran IISRESET in a command prompt, and verified the operation by using the Get-SPWebApplication cmdlet to list all site collections and their content databases:
Get-SPWebApplication | Get-SPSite | Format-Table -Property URL,ContentDatabase

No comments:

Post a Comment